Merge branch 'develop'

This commit is contained in:
Moritz Lipp 2013-01-20 16:39:52 +01:00
commit f8bc1302f5
47 changed files with 3119 additions and 1767 deletions

View file

@ -17,3 +17,6 @@ Johannes Meng <j@jmeng.de>
J. Commelin <jcommeli@math.leidenuniv.nl> J. Commelin <jcommeli@math.leidenuniv.nl>
Julian Orth <ju.orth@googlemail.com> Julian Orth <ju.orth@googlemail.com>
Roland Schatz <roland.schatz@students.jku.at> Roland Schatz <roland.schatz@students.jku.at>
Abdó Roig-Maranges <abdo.roig@gmail.com>
Benoît Knecht <benoit.knecht@gmail.com>
Rob Cornish <jrmcornish@gmail.com>

View file

@ -78,8 +78,11 @@ clean:
${DOBJECTS} ${PROJECT}-debug .depend ${PROJECT}.pc doc version.h \ ${DOBJECTS} ${PROJECT}-debug .depend ${PROJECT}.pc doc version.h \
*gcda *gcno $(PROJECT).info gcov *.tmp \ *gcda *gcno $(PROJECT).info gcov *.tmp \
girara-version-check girara-version-check
$(QUIET)make -C tests clean ifneq "$(wildcard ${RSTTOMAN})" ""
$(QUIET)make -C po clean $(QUIET)rm -f zathura.1 zathurarc.5
endif
$(QUIET)$(MAKE) -C tests clean
$(QUIET)$(MAKE) -C po clean
${PROJECT}-debug: ${DOBJECTS} ${PROJECT}-debug: ${DOBJECTS}
$(ECHO) CC -o $@ $(ECHO) CC -o $@
@ -141,7 +144,8 @@ update-po:
ifneq "$(wildcard ${RSTTOMAN})" "" ifneq "$(wildcard ${RSTTOMAN})" ""
%.1 %.5: config.mk %.1 %.5: config.mk
$(QUIET)sed "s/VERSION/${VERSION}/g" < $@.rst > $@.tmp $(QUIET)sed "s/VERSION/${VERSION}/g" < $@.rst > $@.tmp
$(QUIET)${RSTTOMAN} $@.tmp > $@ $(QUIET)${RSTTOMAN} $@.tmp > $@.out.tmp
$(QUIET)mv $@.out.tmp $@
$(QUIET)rm $@.tmp $(QUIET)rm $@.tmp
${PROJECT}.1: ${PROJECT}.1.rst ${PROJECT}.1: ${PROJECT}.1.rst

5
README
View file

@ -1,15 +1,16 @@
zathura - a document viewer zathura - a document viewer
-------------------- ===========================
zathura is a highly customizable and functional document viewer based on the zathura is a highly customizable and functional document viewer based on the
girara user interface library and several document libraries. girara user interface library and several document libraries.
Requirements Requirements
------------ ------------
gtk2 (>= 2.18.6) gtk2 (>= 2.28)
girara girara
sqlite3 (>= 3.5.9) sqlite3 (>= 3.5.9)
check (for tests) check (for tests)
intltool intltool
python-docutils (for man pages)
Please note that you need to have a working pkg-config installation and that the 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 Makefile is only compatible with GNU make. If you don't have a working

View file

@ -87,7 +87,8 @@ zathura_bookmark_free(zathura_bookmark_t* bookmark)
} }
bool bool
zathura_bookmarks_load(zathura_t* zathura, const gchar* file) { zathura_bookmarks_load(zathura_t* zathura, const gchar* file)
{
g_return_val_if_fail(zathura, false); g_return_val_if_fail(zathura, false);
g_return_val_if_fail(file, false); g_return_val_if_fail(file, false);

View file

@ -58,20 +58,23 @@ cb_view_vadjustment_value_changed(GtkAdjustment* GIRARA_UNUSED(adjustment), gpoi
GtkAdjustment* view_vadjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); GtkAdjustment* view_vadjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
GtkAdjustment* view_hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); GtkAdjustment* view_hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
GdkRectangle view_rect; /* current adjustment values */
/* get current adjustment values */ GdkRectangle view_rect = {
view_rect.y = 0; .x = 0,
view_rect.height = gtk_adjustment_get_page_size(view_vadjustment); .y = 0,
view_rect.x = 0; .width = gtk_adjustment_get_page_size(view_hadjustment),
view_rect.width = gtk_adjustment_get_page_size(view_hadjustment); .height = gtk_adjustment_get_page_size(view_vadjustment)
};
int page_padding = 1; int page_padding = 1;
girara_setting_get(zathura->ui.session, "page-padding", &page_padding); girara_setting_get(zathura->ui.session, "page-padding", &page_padding);
GdkRectangle center; GdkRectangle center = {
center.x = (view_rect.width + 1) / 2; .x = (view_rect.width + 1) / 2,
center.y = (view_rect.height + 1) / 2; .y = (view_rect.height + 1) / 2,
center.height = center.width = (2 * page_padding) + 1; .width = (2 * page_padding) + 1,
.height = (2 * page_padding) + 1
};
unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document); unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document);
double scale = zathura_document_get_scale(zathura->document); double scale = zathura_document_get_scale(zathura->document);
@ -81,12 +84,13 @@ cb_view_vadjustment_value_changed(GtkAdjustment* GIRARA_UNUSED(adjustment), gpoi
for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) { 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); zathura_page_t* page = zathura_document_get_page(zathura->document, page_id);
GdkRectangle page_rect; GdkRectangle page_rect = {
.width = zathura_page_get_width(page) * scale,
.height = zathura_page_get_height(page) * scale
};
GtkWidget* page_widget = zathura_page_get_widget(zathura, page); GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
gtk_widget_translate_coordinates(page_widget, gtk_widget_translate_coordinates(page_widget,
zathura->ui.session->gtk.view, 0, 0, &page_rect.x, &page_rect.y); zathura->ui.session->gtk.view, 0, 0, &page_rect.x, &page_rect.y);
page_rect.width = zathura_page_get_width(page) * scale;
page_rect.height = zathura_page_get_height(page) * scale;
if (gdk_rectangle_intersect(&view_rect, &page_rect, NULL) == TRUE) { if (gdk_rectangle_intersect(&view_rect, &page_rect, NULL) == TRUE) {
zathura_page_set_visibility(page, true); zathura_page_set_visibility(page, true);
@ -156,7 +160,7 @@ cb_first_page_column_value_changed(girara_session_t* session, const char* UNUSED
void void
cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path, cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path,
GtkTreeViewColumn* UNUSED(column), void* data) GtkTreeViewColumn* UNUSED(column), void* data)
{ {
zathura_t* zathura = data; zathura_t* zathura = data;
if (tree_view == NULL || zathura == NULL || zathura->ui.session == NULL) { if (tree_view == NULL || zathura == NULL || zathura->ui.session == NULL) {
@ -177,14 +181,24 @@ cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path,
} }
sc_toggle_index(zathura->ui.session, NULL, NULL, 0); sc_toggle_index(zathura->ui.session, NULL, NULL, 0);
/* zathura_jumplist_save is called when entering index mode */
zathura_link_evaluate(zathura, index_element->link); zathura_link_evaluate(zathura, index_element->link);
zathura_jumplist_add(zathura);
} }
g_object_unref(model); g_object_unref(model);
} }
bool typedef enum zathura_link_action_e
cb_sc_follow(GtkEntry* entry, girara_session_t* session) {
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 != NULL, FALSE);
g_return_val_if_fail(session->global.data != NULL, FALSE); g_return_val_if_fail(session->global.data != NULL, FALSE);
@ -221,9 +235,19 @@ cb_sc_follow(GtkEntry* entry, girara_session_t* session)
if (eval == true) { if (eval == true) {
zathura_link_t* link = zathura_page_widget_link_get(ZATHURA_PAGE(page_widget), index); zathura_link_t* link = zathura_page_widget_link_get(ZATHURA_PAGE(page_widget), index);
if (link != NULL) { if (link != NULL) {
zathura_link_evaluate(zathura, link);
invalid_index = false; invalid_index = false;
switch (action) {
case ZATHURA_LINK_ACTION_FOLLOW:
zathura_jumplist_save(zathura);
zathura_link_evaluate(zathura, link);
zathura_jumplist_add(zathura);
break;
case ZATHURA_LINK_ACTION_DISPLAY:
zathura_link_display(zathura, link);
break;
}
} }
} }
} }
@ -237,6 +261,18 @@ cb_sc_follow(GtkEntry* entry, girara_session_t* session)
return (eval == TRUE) ? TRUE : FALSE; return (eval == TRUE) ? TRUE : FALSE;
} }
bool
cb_sc_follow(GtkEntry* entry, girara_session_t* session)
{
return handle_link(entry, session, ZATHURA_LINK_ACTION_FOLLOW);
}
bool
cb_sc_display_link(GtkEntry* entry, girara_session_t* session)
{
return handle_link(entry, session, ZATHURA_LINK_ACTION_DISPLAY);
}
void void
cb_file_monitor(GFileMonitor* monitor, GFile* file, GFile* UNUSED(other_file), GFileMonitorEvent event, girara_session_t* session) cb_file_monitor(GFileMonitor* monitor, GFile* file, GFile* UNUSED(other_file), GFileMonitorEvent event, girara_session_t* session)
{ {
@ -263,13 +299,13 @@ password_dialog(gpointer data)
if (dialog != NULL) { if (dialog != NULL) {
girara_dialog( girara_dialog(
dialog->zathura->ui.session, dialog->zathura->ui.session,
"Incorrect password. Enter password:", "Incorrect password. Enter password:",
true, true,
NULL, NULL,
(girara_callback_inputbar_activate_t) cb_password_dialog, (girara_callback_inputbar_activate_t) cb_password_dialog,
dialog dialog
); );
} }
return FALSE; return FALSE;
@ -317,8 +353,8 @@ cb_password_dialog(GtkEntry* entry, zathura_password_dialog_info_t* dialog)
error_free: error_free:
g_free(dialog->path); g_free(dialog->path);
free(dialog); free(dialog);
error_ret: error_ret:
@ -349,7 +385,7 @@ cb_view_resized(GtkWidget* UNUSED(widget), GtkAllocation* allocation, zathura_t*
void void
cb_setting_recolor_change(girara_session_t* session, const char* name, cb_setting_recolor_change(girara_session_t* session, const char* name,
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data)) girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{ {
g_return_if_fail(value != NULL); g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL); g_return_if_fail(session != NULL);
@ -367,7 +403,7 @@ cb_setting_recolor_change(girara_session_t* session, const char* name,
void void
cb_setting_recolor_keep_hue_change(girara_session_t* session, const char* name, cb_setting_recolor_keep_hue_change(girara_session_t* session, const char* name,
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data)) girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{ {
g_return_if_fail(value != NULL); g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL); g_return_if_fail(session != NULL);
@ -404,7 +440,9 @@ cb_unknown_command(girara_session_t* session, const char* input)
} }
} }
zathura_jumplist_save(zathura);
page_set(zathura, atoi(input) - 1); page_set(zathura, atoi(input) - 1);
zathura_jumplist_add(zathura);
return true; return true;
} }

View file

@ -80,6 +80,15 @@ void cb_index_row_activated(GtkTreeView* tree_view, GtkTreePath* path,
*/ */
bool cb_sc_follow(GtkEntry* entry, girara_session_t* session); bool cb_sc_follow(GtkEntry* entry, girara_session_t* 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 occured and the event has been handled
*/
bool cb_sc_display_link(GtkEntry* entry, girara_session_t* session);
/** /**
* Emitted when file has been changed * Emitted when file has been changed
* *

View file

@ -165,15 +165,15 @@ cmd_info(girara_session_t* session, girara_list_t* UNUSED(argument_list))
GString* string = g_string_new(NULL); GString* string = g_string_new(NULL);
GIRARA_LIST_FOREACH(information, zathura_document_information_entry_t*, iter, entry) GIRARA_LIST_FOREACH(information, zathura_document_information_entry_t*, iter, entry)
if (entry != NULL) { if (entry != NULL) {
for (unsigned int i = 0; i < LENGTH(meta_fields); i++) { for (unsigned int i = 0; i < LENGTH(meta_fields); i++) {
if (meta_fields[i].field == entry->type) { if (meta_fields[i].field == entry->type) {
char* text = g_strdup_printf("<b>%s:</b> %s\n", meta_fields[i].name, entry->value); char* text = g_strdup_printf("<b>%s:</b> %s\n", meta_fields[i].name, entry->value);
g_string_append(string, text); g_string_append(string, text);
g_free(text); g_free(text);
}
} }
} }
}
GIRARA_LIST_FOREACH_END(information, zathura_document_information_entry_t*, iter, entry); GIRARA_LIST_FOREACH_END(information, zathura_document_information_entry_t*, iter, entry);
if (strlen(string->str) > 0) { if (strlen(string->str) > 0) {
@ -190,7 +190,7 @@ cmd_info(girara_session_t* session, girara_list_t* UNUSED(argument_list))
bool bool
cmd_help(girara_session_t* UNUSED(session), girara_list_t* cmd_help(girara_session_t* UNUSED(session), girara_list_t*
UNUSED(argument_list)) UNUSED(argument_list))
{ {
return true; return true;
} }
@ -340,6 +340,8 @@ cmd_search(girara_session_t* session, const char* input, girara_argument_t* argu
bool firsthit = true; bool firsthit = true;
zathura_error_t error = ZATHURA_ERROR_OK; 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 number_of_pages = zathura_document_get_number_of_pages(zathura->document);
unsigned int current_page_number = zathura_document_get_current_page_number(zathura->document); unsigned int current_page_number = zathura_document_get_current_page_number(zathura->document);
@ -363,7 +365,10 @@ cmd_search(girara_session_t* session, const char* input, girara_argument_t* argu
GtkWidget* page_widget = zathura_page_get_widget(zathura, page); GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
g_object_set(page_widget, "draw-links", FALSE, NULL); g_object_set(page_widget, "draw-links", FALSE, NULL);
render_lock(zathura->sync.render_thread);
girara_list_t* result = zathura_page_search_text(page, input, &error); girara_list_t* result = zathura_page_search_text(page, input, &error);
render_unlock(zathura->sync.render_thread);
if (result == NULL || girara_list_size(result) == 0) { if (result == NULL || girara_list_size(result) == 0) {
girara_list_free(result); girara_list_free(result);
g_object_set(page_widget, "search-results", NULL, NULL); g_object_set(page_widget, "search-results", NULL, NULL);
@ -380,7 +385,12 @@ cmd_search(girara_session_t* session, const char* input, girara_argument_t* argu
if (page_id != 0) { if (page_id != 0) {
page_set_delayed(zathura, zathura_page_get_index(page)); page_set_delayed(zathura, zathura_page_get_index(page));
} }
g_object_set(page_widget, "search-current", 0, NULL); if (argument->n == BACKWARD) {
/* start at bottom hit in page */
g_object_set(page_widget, "search-current", girara_list_size(result) - 1, NULL);
} else {
g_object_set(page_widget, "search-current", 0, NULL);
}
firsthit = false; firsthit = false;
} }
} }
@ -423,7 +433,7 @@ cmd_export(girara_session_t* session, girara_list_t* argument_list)
} else { } else {
girara_notify(session, GIRARA_INFO, _("Wrote attachment '%s' to '%s'."), file_identifier, export_path); girara_notify(session, GIRARA_INFO, _("Wrote attachment '%s' to '%s'."), file_identifier, export_path);
} }
/* image */ /* image */
} else if (strncmp(file_identifier, "image-p", strlen("image-p")) == 0 && strlen(file_identifier) >= 10) { } else if (strncmp(file_identifier, "image-p", strlen("image-p")) == 0 && strlen(file_identifier) >= 10) {
/* parse page id */ /* parse page id */
const char* input = file_identifier + strlen("image-p"); const char* input = file_identifier + strlen("image-p");
@ -476,7 +486,7 @@ image_error:
girara_notify(session, GIRARA_ERROR, _("Unknown image '%s'."), file_identifier); girara_notify(session, GIRARA_ERROR, _("Unknown image '%s'."), file_identifier);
goto error_ret; goto error_ret;
/* unknown */ /* unknown */
} else { } else {
girara_notify(session, GIRARA_ERROR, _("Unknown attachment or image '%s'."), file_identifier); girara_notify(session, GIRARA_ERROR, _("Unknown attachment or image '%s'."), file_identifier);
} }
@ -499,10 +509,10 @@ cmd_exec(girara_session_t* session, girara_list_t* argument_list)
const char* path = zathura_document_get_path(zathura->document); const char* path = zathura_document_get_path(zathura->document);
GIRARA_LIST_FOREACH(argument_list, char*, iter, value) GIRARA_LIST_FOREACH(argument_list, char*, iter, value)
char* r = NULL; char* r = NULL;
if ((r = replace_substring(value, "$FILE", path)) != NULL) { if ((r = replace_substring(value, "$FILE", path)) != NULL) {
girara_list_iterator_set(iter, r); girara_list_iterator_set(iter, r);
} }
GIRARA_LIST_FOREACH_END(argument_list, char*, iter, value); GIRARA_LIST_FOREACH_END(argument_list, char*, iter, value);
} }
@ -550,9 +560,9 @@ cmd_version(girara_session_t* session, girara_list_t* UNUSED(argument_list))
zathura_t* zathura = session->global.data; zathura_t* zathura = session->global.data;
char* string = zathura_get_version_string(zathura, true); char* string = zathura_get_version_string(zathura, true);
if (string == NULL) { if (string == NULL) {
return false; return false;
} }
/* display information */ /* display information */
girara_notify(session, GIRARA_INFO, "%s", string); girara_notify(session, GIRARA_INFO, "%s", string);

View file

@ -32,7 +32,7 @@ compare_case_insensitive(const char* str1, const char* str2)
static girara_list_t* static girara_list_t*
list_files(zathura_t* zathura, const char* current_path, const char* current_file, list_files(zathura_t* zathura, const char* current_path, const char* current_file,
unsigned int current_file_length, bool is_dir, bool check_file_ext) unsigned int current_file_length, bool is_dir, bool check_file_ext)
{ {
if (zathura == NULL || zathura->ui.session == NULL || current_path == NULL) { if (zathura == NULL || zathura->ui.session == NULL || current_path == NULL) {
return NULL; return NULL;
@ -45,7 +45,7 @@ list_files(zathura_t* zathura, const char* current_path, const char* current_fil
} }
girara_list_t* res = girara_sorted_list_new2((girara_compare_function_t)compare_case_insensitive, girara_list_t* res = girara_sorted_list_new2((girara_compare_function_t)compare_case_insensitive,
(girara_free_function_t)g_free); (girara_free_function_t)g_free);
bool show_hidden = false; bool show_hidden = false;
girara_setting_get(zathura->ui.session, "show-hidden", &show_hidden); girara_setting_get(zathura->ui.session, "show-hidden", &show_hidden);
@ -179,7 +179,7 @@ list_files_for_cc(zathura_t* zathura, const char* input, bool check_file_ext)
} }
GIRARA_LIST_FOREACH(names, const char*, iter, file) GIRARA_LIST_FOREACH(names, const char*, iter, file)
girara_completion_group_add_element(group, file, NULL); girara_completion_group_add_element(group, file, NULL);
GIRARA_LIST_FOREACH_END(names, const char*, iter, file); GIRARA_LIST_FOREACH_END(names, const char*, iter, file);
girara_list_free(names); girara_list_free(names);
} }
@ -246,11 +246,11 @@ cc_bookmarks(girara_session_t* session, const char* input)
const size_t input_length = strlen(input); const size_t input_length = strlen(input);
GIRARA_LIST_FOREACH(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark) GIRARA_LIST_FOREACH(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark)
if (input_length <= strlen(bookmark->id) && !strncmp(input, bookmark->id, input_length)) { if (input_length <= strlen(bookmark->id) && !strncmp(input, bookmark->id, input_length)) {
gchar* paged = g_strdup_printf(_("Page %d"), bookmark->page); gchar* paged = g_strdup_printf(_("Page %d"), bookmark->page);
girara_completion_group_add_element(group, bookmark->id, paged); girara_completion_group_add_element(group, bookmark->id, paged);
g_free(paged); g_free(paged);
} }
GIRARA_LIST_FOREACH_END(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark); GIRARA_LIST_FOREACH_END(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark);
girara_completion_add_group(completion, group); girara_completion_add_group(completion, group);
@ -302,12 +302,12 @@ cc_export(girara_session_t* session, const char* input)
bool added = false; bool added = false;
GIRARA_LIST_FOREACH(attachments, const char*, iter, attachment) GIRARA_LIST_FOREACH(attachments, const char*, iter, attachment)
if (input_length <= strlen(attachment) && !strncmp(input, attachment, input_length)) { if (input_length <= strlen(attachment) && !strncmp(input, attachment, input_length)) {
char* attachment_string = g_strdup_printf("attachment-%s", attachment); char* attachment_string = g_strdup_printf("attachment-%s", attachment);
girara_completion_group_add_element(attachment_group, attachment_string, NULL); girara_completion_group_add_element(attachment_group, attachment_string, NULL);
g_free(attachment_string); g_free(attachment_string);
added = true; added = true;
} }
GIRARA_LIST_FOREACH_END(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark); GIRARA_LIST_FOREACH_END(zathura->bookmarks.bookmarks, zathura_bookmark_t*, iter, bookmark);
if (added == true) { if (added == true) {
@ -339,12 +339,12 @@ cc_export(girara_session_t* session, const char* input)
if (images != NULL) { if (images != NULL) {
unsigned int image_number = 1; unsigned int image_number = 1;
GIRARA_LIST_FOREACH(images, zathura_image_t*, iter, UNUSED(image)) 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); 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); girara_completion_group_add_element(image_group, image_string, NULL);
g_free(image_string); g_free(image_string);
added = true; added = true;
image_number++; image_number++;
GIRARA_LIST_FOREACH_END(images, zathura_image_t*, iter, image); GIRARA_LIST_FOREACH_END(images, zathura_image_t*, iter, image);
girara_list_free(images); girara_list_free(images);
} }

104
config.c
View file

@ -18,9 +18,24 @@
#include <girara/gtk2-compat.h> #include <girara/gtk2-compat.h>
#include <glib/gi18n.h> #include <glib/gi18n.h>
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;
if (g_strcmp0(name, "jumplist-size") == 0) {
int* max_size = (int*) value;
zathura->jumplist.max_size = *max_size;
}
}
static void static void
cb_color_change(girara_session_t* session, const char* name, cb_color_change(girara_session_t* session, const char* name,
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data)) girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{ {
g_return_if_fail(value != NULL); g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL); g_return_if_fail(session != NULL);
@ -44,7 +59,7 @@ cb_color_change(girara_session_t* session, const char* name,
static void static void
cb_page_padding_changed(girara_session_t* session, const char* UNUSED(name), cb_page_padding_changed(girara_session_t* session, const char* UNUSED(name),
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data)) girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{ {
g_return_if_fail(value != NULL); g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL); g_return_if_fail(session != NULL);
@ -65,7 +80,7 @@ cb_page_padding_changed(girara_session_t* session, const char* UNUSED(name),
static void static void
cb_nohlsearch_changed(girara_session_t* session, const char* UNUSED(name), cb_nohlsearch_changed(girara_session_t* session, const char* UNUSED(name),
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data)) girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
{ {
g_return_if_fail(value != NULL); g_return_if_fail(value != NULL);
g_return_if_fail(session != NULL); g_return_if_fail(session != NULL);
@ -76,6 +91,20 @@ cb_nohlsearch_changed(girara_session_t* session, const char* UNUSED(name),
render_all(zathura); 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 void
config_load_default(zathura_t* zathura) config_load_default(zathura_t* zathura)
{ {
@ -86,6 +115,7 @@ config_load_default(zathura_t* zathura)
int int_value = 0; int int_value = 0;
float float_value = 0; float float_value = 0;
bool bool_value = false; bool bool_value = false;
bool inc_search = true;
girara_session_t* gsession = zathura->ui.session; girara_session_t* gsession = zathura->ui.session;
/* mode settings */ /* mode settings */
@ -115,6 +145,8 @@ config_load_default(zathura_t* zathura)
girara_setting_add(gsession, "scroll-step", &float_value, FLOAT, false, _("Scroll step"), NULL, NULL); girara_setting_add(gsession, "scroll-step", &float_value, FLOAT, false, _("Scroll step"), NULL, NULL);
float_value = -1; float_value = -1;
girara_setting_add(gsession, "scroll-hstep", &float_value, FLOAT, false, _("Horizontal scroll step"), NULL, NULL); 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; int_value = 10;
girara_setting_add(gsession, "zoom-min", &int_value, INT, false, _("Zoom minimum"), NULL, NULL); girara_setting_add(gsession, "zoom-min", &int_value, INT, false, _("Zoom minimum"), NULL, NULL);
int_value = 1000; int_value = 1000;
@ -122,6 +154,8 @@ config_load_default(zathura_t* zathura)
int_value = 20; int_value = 20;
girara_setting_add(gsession, "page-store-threshold", &int_value, INT, false, _("Life time (in seconds) of a hidden page"), NULL, NULL); girara_setting_add(gsession, "page-store-threshold", &int_value, INT, false, _("Life time (in seconds) of a hidden page"), NULL, NULL);
girara_setting_add(gsession, "page-store-interval", &int_value, INT, true, _("Amount of seconds between each cache purge"), NULL, NULL); girara_setting_add(gsession, "page-store-interval", &int_value, INT, true, _("Amount of seconds between each cache purge"), NULL, NULL);
int_value = 20;
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", NULL, STRING, false, _("Recoloring (dark color)"), cb_color_change, NULL); girara_setting_add(gsession, "recolor-darkcolor", NULL, STRING, false, _("Recoloring (dark color)"), cb_color_change, NULL);
girara_setting_set(gsession, "recolor-darkcolor", "#FFFFFF"); girara_setting_set(gsession, "recolor-darkcolor", "#FFFFFF");
@ -139,6 +173,8 @@ config_load_default(zathura_t* zathura)
bool_value = false; bool_value = false;
girara_setting_add(gsession, "scroll-wrap", &bool_value, BOOLEAN, false, _("Wrap scrolling"), NULL, NULL); girara_setting_add(gsession, "scroll-wrap", &bool_value, BOOLEAN, false, _("Wrap scrolling"), NULL, NULL);
bool_value = false; bool_value = false;
girara_setting_add(gsession, "scroll-page-aware", &bool_value, BOOLEAN, false, _("Page aware scrolling"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "advance-pages-per-row", &bool_value, BOOLEAN, false, _("Advance number of pages per row"), NULL, NULL); girara_setting_add(gsession, "advance-pages-per-row", &bool_value, BOOLEAN, false, _("Advance number of pages per row"), NULL, NULL);
bool_value = false; bool_value = false;
girara_setting_add(gsession, "zoom-center", &bool_value, BOOLEAN, false, _("Horizontally centered zoom"), NULL, NULL); girara_setting_add(gsession, "zoom-center", &bool_value, BOOLEAN, false, _("Horizontally centered zoom"), NULL, NULL);
@ -157,6 +193,8 @@ config_load_default(zathura_t* zathura)
girara_setting_add(gsession, "open-first-page", &bool_value, BOOLEAN, false, _("Always open on first page"), NULL, NULL); girara_setting_add(gsession, "open-first-page", &bool_value, BOOLEAN, false, _("Always open on first page"), NULL, NULL);
bool_value = false; bool_value = false;
girara_setting_add(gsession, "nohlsearch", &bool_value, BOOLEAN, false, _("Highlight search results"), cb_nohlsearch_changed, NULL); girara_setting_add(gsession, "nohlsearch", &bool_value, BOOLEAN, false, _("Highlight search results"), cb_nohlsearch_changed, NULL);
inc_search = false;
girara_setting_add(gsession, "incremental-search", &inc_search, BOOLEAN, false, _("Enable incremental search"), cb_incsearch_changed, NULL);
bool_value = true; bool_value = true;
girara_setting_add(gsession, "abort-clear-search", &bool_value, BOOLEAN, false, _("Clear search results on abort"), NULL, NULL); girara_setting_add(gsession, "abort-clear-search", &bool_value, BOOLEAN, false, _("Clear search results on abort"), NULL, NULL);
bool_value = false; bool_value = false;
@ -171,6 +209,8 @@ config_load_default(zathura_t* zathura)
girara_shortcut_add(gsession, 0, GDK_KEY_a, NULL, sc_adjust_window, NORMAL, ZATHURA_ADJUST_BESTFIT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_a, NULL, sc_adjust_window, NORMAL, ZATHURA_ADJUST_BESTFIT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_s, NULL, sc_adjust_window, NORMAL, ZATHURA_ADJUST_WIDTH, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_s, NULL, sc_adjust_window, NORMAL, ZATHURA_ADJUST_WIDTH, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_F, NULL, sc_display_link, NORMAL, 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_slash, NULL, sc_focus_inputbar, NORMAL, 0, &("/")); girara_shortcut_add(gsession, 0, GDK_KEY_slash, NULL, sc_focus_inputbar, NORMAL, 0, &("/"));
girara_shortcut_add(gsession, GDK_SHIFT_MASK, GDK_KEY_slash, NULL, sc_focus_inputbar, NORMAL, 0, &("/")); girara_shortcut_add(gsession, GDK_SHIFT_MASK, GDK_KEY_slash, NULL, sc_focus_inputbar, NORMAL, 0, &("/"));
girara_shortcut_add(gsession, 0, GDK_KEY_question, NULL, sc_focus_inputbar, NORMAL, 0, &("?")); girara_shortcut_add(gsession, 0, GDK_KEY_question, NULL, sc_focus_inputbar, NORMAL, 0, &("?"));
@ -195,13 +235,15 @@ config_load_default(zathura_t* zathura)
girara_shortcut_add(gsession, 0, GDK_KEY_Page_Down, NULL, sc_navigate, NORMAL, NEXT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_Page_Down, NULL, sc_navigate, NORMAL, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Page_Up, NULL, sc_navigate, NORMAL, PREVIOUS, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_Page_Up, NULL, sc_navigate, NORMAL, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_J, NULL, sc_navigate, FULLSCREEN, NEXT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_J, NULL, sc_navigate, FULLSCREEN, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_K, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Left, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Up, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Down, NULL, sc_navigate, FULLSCREEN, NEXT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_Down, NULL, sc_navigate, FULLSCREEN, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Right, NULL, sc_navigate, FULLSCREEN, NEXT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_Right, NULL, sc_navigate, FULLSCREEN, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Page_Down, NULL, sc_navigate, FULLSCREEN, NEXT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_Page_Down, NULL, sc_navigate, FULLSCREEN, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_space, NULL, sc_navigate, FULLSCREEN, NEXT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_K, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Left, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Up, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_Page_Up, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_Page_Up, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL);
girara_shortcut_add(gsession, GDK_SHIFT_MASK, GDK_KEY_space, NULL, sc_navigate, FULLSCREEN, PREVIOUS, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_k, NULL, sc_navigate_index, INDEX, UP, 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_j, NULL, sc_navigate_index, INDEX, DOWN, NULL);
@ -218,7 +260,7 @@ config_load_default(zathura_t* zathura)
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_p, NULL, sc_print, NORMAL, 0, NULL); girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_p, NULL, sc_print, NORMAL, 0, NULL);
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_i, NULL, sc_recolor, NORMAL, 0, NULL); girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_r, NULL, sc_recolor, NORMAL, 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_R, NULL, sc_reload, NORMAL, 0, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_R, NULL, sc_reload, NORMAL, 0, NULL);
@ -242,6 +284,8 @@ config_load_default(zathura_t* zathura)
girara_shortcut_add(gsession, 0, GDK_KEY_y, NULL, sc_scroll, NORMAL, FULL_RIGHT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_y, NULL, sc_scroll, NORMAL, FULL_RIGHT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_space, NULL, sc_scroll, NORMAL, FULL_DOWN, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_space, NULL, sc_scroll, NORMAL, FULL_DOWN, NULL);
girara_shortcut_add(gsession, GDK_SHIFT_MASK, GDK_KEY_space, NULL, sc_scroll, NORMAL, FULL_UP, NULL); girara_shortcut_add(gsession, GDK_SHIFT_MASK, GDK_KEY_space, NULL, sc_scroll, NORMAL, FULL_UP, NULL);
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_o, NULL, sc_jumplist, NORMAL, BACKWARD, NULL);
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_i, NULL, sc_jumplist, NORMAL, FORWARD, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_n, NULL, sc_search, NORMAL, FORWARD, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_n, NULL, sc_search, NORMAL, FORWARD, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_N, NULL, sc_search, NORMAL, BACKWARD, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_N, NULL, sc_search, NORMAL, BACKWARD, NULL);
@ -252,15 +296,20 @@ config_load_default(zathura_t* zathura)
girara_shortcut_add(gsession, 0, GDK_KEY_F5, NULL, sc_toggle_fullscreen, FULLSCREEN, 0, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_F5, NULL, sc_toggle_fullscreen, FULLSCREEN, 0, NULL);
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_n, NULL, girara_sc_toggle_statusbar, NORMAL, 0, NULL); girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_n, NULL, girara_sc_toggle_statusbar, NORMAL, 0, NULL);
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_m, NULL, girara_sc_toggle_inputbar, NORMAL, 0, NULL); girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_m, NULL, girara_sc_toggle_inputbar, NORMAL, 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_d, NULL, sc_toggle_page_mode, NORMAL, 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_q, NULL, sc_quit, NORMAL, 0, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_q, NULL, sc_quit, NORMAL, 0, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_plus, NULL, sc_zoom, NORMAL, ZOOM_IN, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_plus, NULL, sc_zoom, NORMAL, ZOOM_IN, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_KP_Add, NULL, sc_zoom, NORMAL, ZOOM_IN, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_plus, NULL, sc_zoom, FULLSCREEN, ZOOM_IN, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_plus, NULL, sc_zoom, FULLSCREEN, ZOOM_IN, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_KP_Add, NULL, sc_zoom, FULLSCREEN, ZOOM_IN, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_minus, NULL, sc_zoom, NORMAL, ZOOM_OUT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_minus, NULL, sc_zoom, NORMAL, ZOOM_OUT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_KP_Subtract,NULL, sc_zoom, NORMAL, ZOOM_OUT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_minus, NULL, sc_zoom, FULLSCREEN, ZOOM_OUT, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_minus, NULL, sc_zoom, FULLSCREEN, ZOOM_OUT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_equal, NULL, sc_zoom, NORMAL, ZOOM_ORIGINAL, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_KP_Subtract,NULL, sc_zoom, FULLSCREEN, ZOOM_OUT, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_equal, NULL, sc_zoom, FULLSCREEN, ZOOM_ORIGINAL, NULL); girara_shortcut_add(gsession, 0, GDK_KEY_equal, NULL, sc_zoom, NORMAL, ZOOM_SPECIFIC, NULL);
girara_shortcut_add(gsession, 0, GDK_KEY_equal, NULL, sc_zoom, FULLSCREEN, ZOOM_SPECIFIC, NULL);
girara_shortcut_add(gsession, 0, 0, "zi", sc_zoom, NORMAL, ZOOM_IN, NULL); girara_shortcut_add(gsession, 0, 0, "zi", sc_zoom, NORMAL, ZOOM_IN, NULL);
girara_shortcut_add(gsession, 0, 0, "zi", sc_zoom, FULLSCREEN, ZOOM_IN, NULL); girara_shortcut_add(gsession, 0, 0, "zi", sc_zoom, FULLSCREEN, ZOOM_IN, NULL);
girara_shortcut_add(gsession, 0, 0, "zI", sc_zoom, NORMAL, ZOOM_IN, NULL); girara_shortcut_add(gsession, 0, 0, "zI", sc_zoom, NORMAL, ZOOM_IN, NULL);
@ -276,11 +325,28 @@ config_load_default(zathura_t* zathura)
girara_shortcut_add(gsession, 0, 0, "zZ", sc_zoom, NORMAL, ZOOM_SPECIFIC, NULL); girara_shortcut_add(gsession, 0, 0, "zZ", sc_zoom, NORMAL, ZOOM_SPECIFIC, NULL);
girara_shortcut_add(gsession, 0, 0, "zZ", sc_zoom, FULLSCREEN, ZOOM_SPECIFIC, NULL); girara_shortcut_add(gsession, 0, 0, "zZ", sc_zoom, FULLSCREEN, ZOOM_SPECIFIC, 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);
/* mouse events */ /* mouse events */
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_SCROLL_UP, UP, NULL); girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_SCROLL_UP, UP, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, FULLSCREEN, GIRARA_EVENT_SCROLL_UP, UP, NULL); girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, FULLSCREEN, GIRARA_EVENT_SCROLL_UP, UP, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL); girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, FULLSCREEN, GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL); girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, FULLSCREEN, GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_SCROLL_LEFT, LEFT, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, FULLSCREEN, GIRARA_EVENT_SCROLL_LEFT, LEFT, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_SCROLL_RIGHT, RIGHT, NULL);
girara_mouse_event_add(gsession, 0, 0, sc_mouse_scroll, FULLSCREEN, GIRARA_EVENT_SCROLL_RIGHT, RIGHT, NULL);
girara_mouse_event_add(gsession, 0, GIRARA_MOUSE_BUTTON1, sc_navigate, FULLSCREEN, GIRARA_EVENT_BUTTON_PRESS, NEXT, NULL);
girara_mouse_event_add(gsession, 0, GIRARA_MOUSE_BUTTON3, sc_navigate, FULLSCREEN, GIRARA_EVENT_BUTTON_PRESS, PREVIOUS, NULL);
girara_mouse_event_add(gsession, GDK_SHIFT_MASK, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_SCROLL_UP, LEFT, NULL);
girara_mouse_event_add(gsession, GDK_SHIFT_MASK, 0, sc_mouse_scroll, FULLSCREEN, GIRARA_EVENT_SCROLL_UP, LEFT, NULL);
girara_mouse_event_add(gsession, GDK_SHIFT_MASK, 0, sc_mouse_scroll, NORMAL, GIRARA_EVENT_SCROLL_DOWN, RIGHT, NULL);
girara_mouse_event_add(gsession, GDK_SHIFT_MASK, 0, sc_mouse_scroll, FULLSCREEN, GIRARA_EVENT_SCROLL_DOWN, RIGHT, NULL);
girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, NORMAL, GIRARA_EVENT_SCROLL_UP, UP, NULL); girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, NORMAL, GIRARA_EVENT_SCROLL_UP, UP, NULL);
girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, FULLSCREEN, GIRARA_EVENT_SCROLL_UP, UP, NULL); girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, FULLSCREEN, GIRARA_EVENT_SCROLL_UP, UP, NULL);
girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, NORMAL, GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL); girara_mouse_event_add(gsession, GDK_CONTROL_MASK, 0, sc_mouse_zoom, NORMAL, GIRARA_EVENT_SCROLL_DOWN, DOWN, NULL);
@ -310,17 +376,20 @@ config_load_default(zathura_t* zathura)
girara_inputbar_command_add(gsession, "hlsearch", NULL, cmd_hlsearch, NULL, _("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_inputbar_command_add(gsession, "version", NULL, cmd_version, NULL, _("Show version information"));
girara_special_command_add(gsession, '/', cmd_search, true, FORWARD, NULL); girara_special_command_add(gsession, '/', cmd_search, inc_search, FORWARD, NULL);
girara_special_command_add(gsession, '?', cmd_search, true, BACKWARD, NULL); girara_special_command_add(gsession, '?', cmd_search, inc_search, BACKWARD, NULL);
/* add shortcut mappings */ /* add shortcut mappings */
girara_shortcut_mapping_add(gsession, "abort", sc_abort); girara_shortcut_mapping_add(gsession, "abort", sc_abort);
girara_shortcut_mapping_add(gsession, "adjust_window", sc_adjust_window); girara_shortcut_mapping_add(gsession, "adjust_window", sc_adjust_window);
girara_shortcut_mapping_add(gsession, "change_mode", sc_change_mode); 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, "focus_inputbar", sc_focus_inputbar);
girara_shortcut_mapping_add(gsession, "follow", sc_follow); girara_shortcut_mapping_add(gsession, "follow", sc_follow);
girara_shortcut_mapping_add(gsession, "goto", sc_goto); girara_shortcut_mapping_add(gsession, "goto", sc_goto);
girara_shortcut_mapping_add(gsession, "navigate_index", sc_navigate_index); girara_shortcut_mapping_add(gsession, "jumplist", sc_jumplist);
girara_shortcut_mapping_add(gsession, "navigate", sc_navigate); 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, "print", sc_print);
girara_shortcut_mapping_add(gsession, "quit", sc_quit); girara_shortcut_mapping_add(gsession, "quit", sc_quit);
girara_shortcut_mapping_add(gsession, "recolor", sc_recolor); girara_shortcut_mapping_add(gsession, "recolor", sc_recolor);
@ -331,10 +400,12 @@ config_load_default(zathura_t* zathura)
girara_shortcut_mapping_add(gsession, "toggle_fullscreen", sc_toggle_fullscreen); 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_index", sc_toggle_index);
girara_shortcut_mapping_add(gsession, "toggle_inputbar", girara_sc_toggle_inputbar); girara_shortcut_mapping_add(gsession, "toggle_inputbar", girara_sc_toggle_inputbar);
girara_shortcut_mapping_add(gsession, "toggle_page_mode", sc_toggle_page_mode);
girara_shortcut_mapping_add(gsession, "toggle_statusbar", girara_sc_toggle_statusbar); girara_shortcut_mapping_add(gsession, "toggle_statusbar", girara_sc_toggle_statusbar);
girara_shortcut_mapping_add(gsession, "zoom", sc_zoom); girara_shortcut_mapping_add(gsession, "zoom", sc_zoom);
/* add argument mappings */ /* add argument mappings */
girara_argument_mapping_add(gsession, "backward", BACKWARD);
girara_argument_mapping_add(gsession, "bottom", BOTTOM); girara_argument_mapping_add(gsession, "bottom", BOTTOM);
girara_argument_mapping_add(gsession, "default", DEFAULT); girara_argument_mapping_add(gsession, "default", DEFAULT);
girara_argument_mapping_add(gsession, "collapse", COLLAPSE); girara_argument_mapping_add(gsession, "collapse", COLLAPSE);
@ -342,6 +413,7 @@ config_load_default(zathura_t* zathura)
girara_argument_mapping_add(gsession, "down", DOWN); girara_argument_mapping_add(gsession, "down", DOWN);
girara_argument_mapping_add(gsession, "expand", EXPAND); girara_argument_mapping_add(gsession, "expand", EXPAND);
girara_argument_mapping_add(gsession, "expand-all", EXPAND_ALL); girara_argument_mapping_add(gsession, "expand-all", EXPAND_ALL);
girara_argument_mapping_add(gsession, "forward", FORWARD);
girara_argument_mapping_add(gsession, "full-down", FULL_DOWN); girara_argument_mapping_add(gsession, "full-down", FULL_DOWN);
girara_argument_mapping_add(gsession, "full-up", FULL_UP); girara_argument_mapping_add(gsession, "full-up", FULL_UP);
girara_argument_mapping_add(gsession, "half-down", HALF_DOWN); girara_argument_mapping_add(gsession, "half-down", HALF_DOWN);

View file

@ -3,7 +3,7 @@
ZATHURA_VERSION_MAJOR = 0 ZATHURA_VERSION_MAJOR = 0
ZATHURA_VERSION_MINOR = 2 ZATHURA_VERSION_MINOR = 2
ZATHURA_VERSION_REV = 1 ZATHURA_VERSION_REV = 2
# If the API changes, the API version and the ABI version have to be bumped. # If the API changes, the API version and the ABI version have to be bumped.
ZATHURA_API_VERSION = 2 ZATHURA_API_VERSION = 2
# If the ABI breaks for any reason, this has to be bumped. # If the ABI breaks for any reason, this has to be bumped.
@ -16,7 +16,7 @@ ZATHURA_GTK_VERSION ?= 2
# minimum required zathura version # minimum required zathura version
# If you want to disable the check, set GIRARA_VERSION_CHECK to 0. # If you want to disable the check, set GIRARA_VERSION_CHECK to 0.
GIRARA_MIN_VERSION = 0.1.4 GIRARA_MIN_VERSION = 0.1.5
GIRARA_VERSION_CHECK ?= $(shell pkg-config --atleast-version=$(GIRARA_MIN_VERSION) girara-gtk${ZATHURA_GTK_VERSION}; echo $$?) GIRARA_VERSION_CHECK ?= $(shell pkg-config --atleast-version=$(GIRARA_MIN_VERSION) girara-gtk${ZATHURA_GTK_VERSION}; echo $$?)
# database # database

View file

@ -39,28 +39,28 @@
static void zathura_database_interface_init(ZathuraDatabaseInterface* iface); static void zathura_database_interface_init(ZathuraDatabaseInterface* iface);
G_DEFINE_TYPE_WITH_CODE(ZathuraPlainDatabase, zathura_plaindatabase, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE(ZathuraPlainDatabase, zathura_plaindatabase, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE(ZATHURA_TYPE_DATABASE, zathura_database_interface_init)) G_IMPLEMENT_INTERFACE(ZATHURA_TYPE_DATABASE, zathura_database_interface_init))
static void plain_finalize(GObject* object); static void plain_finalize(GObject* object);
static bool plain_add_bookmark(zathura_database_t* db, const char* file, static bool plain_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark); zathura_bookmark_t* bookmark);
static bool plain_remove_bookmark(zathura_database_t* db, const char* file, static bool plain_remove_bookmark(zathura_database_t* db, const char* file,
const char* id); const char* id);
static girara_list_t* plain_load_bookmarks(zathura_database_t* db, static girara_list_t* plain_load_bookmarks(zathura_database_t* db,
const char* file); const char* file);
static bool plain_set_fileinfo(zathura_database_t* db, const char* file, static bool plain_set_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info); zathura_fileinfo_t* file_info);
static bool plain_get_fileinfo(zathura_database_t* db, const char* file, static bool plain_get_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info); zathura_fileinfo_t* file_info);
static void plain_set_property(GObject* object, guint prop_id, static void plain_set_property(GObject* object, guint prop_id,
const GValue* value, GParamSpec* pspec); const GValue* value, GParamSpec* pspec);
/* forward declaration */ /* forward declaration */
static bool zathura_db_check_file(const char* path); static bool zathura_db_check_file(const char* path);
static GKeyFile* zathura_db_read_key_file_from_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 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* static void cb_zathura_db_watch_file(GFileMonitor* monitor, GFile* file, GFile*
other_file, GFileMonitorEvent event, zathura_database_t* database); other_file, GFileMonitorEvent event, zathura_database_t* database);
typedef struct zathura_plaindatabase_private_s { typedef struct zathura_plaindatabase_private_s {
char* bookmark_path; char* bookmark_path;
@ -75,8 +75,7 @@ typedef struct zathura_plaindatabase_private_s {
#define ZATHURA_PLAINDATABASE_GET_PRIVATE(obj) \ #define ZATHURA_PLAINDATABASE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZATHURA_TYPE_PLAINDATABASE, zathura_plaindatabase_private_t)) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZATHURA_TYPE_PLAINDATABASE, zathura_plaindatabase_private_t))
enum enum {
{
PROP_0, PROP_0,
PROP_PATH PROP_PATH
}; };
@ -118,8 +117,8 @@ zathura_plaindatabase_class_init(ZathuraPlainDatabaseClass* class)
object_class->set_property = plain_set_property; object_class->set_property = plain_set_property;
g_object_class_install_property(object_class, PROP_PATH, 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", g_param_spec_string("path", "path", "path to directory where the bookmarks and history are locates",
NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
} }
static void static void
@ -171,10 +170,10 @@ plain_db_init(ZathuraPlainDatabase* db, const char* dir)
g_object_unref(bookmark_file); g_object_unref(bookmark_file);
g_signal_connect( g_signal_connect(
G_OBJECT(priv->bookmark_monitor), G_OBJECT(priv->bookmark_monitor),
"changed", "changed",
G_CALLBACK(cb_zathura_db_watch_file), G_CALLBACK(cb_zathura_db_watch_file),
db db
); );
priv->bookmarks = zathura_db_read_key_file_from_file(priv->bookmark_path); priv->bookmarks = zathura_db_read_key_file_from_file(priv->bookmark_path);
@ -198,10 +197,10 @@ plain_db_init(ZathuraPlainDatabase* db, const char* dir)
g_object_unref(history_file); g_object_unref(history_file);
g_signal_connect( g_signal_connect(
G_OBJECT(priv->history_monitor), G_OBJECT(priv->history_monitor),
"changed", "changed",
G_CALLBACK(cb_zathura_db_watch_file), G_CALLBACK(cb_zathura_db_watch_file),
db db
); );
priv->history = zathura_db_read_key_file_from_file(priv->history_path); priv->history = zathura_db_read_key_file_from_file(priv->history_path);
@ -289,7 +288,7 @@ plain_finalize(GObject* object)
static bool static bool
plain_add_bookmark(zathura_database_t* db, const char* file, plain_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark) zathura_bookmark_t* bookmark)
{ {
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db); zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->bookmarks == NULL || priv->bookmark_path == NULL || if (priv->bookmarks == NULL || priv->bookmark_path == NULL ||
@ -308,7 +307,7 @@ plain_add_bookmark(zathura_database_t* db, const char* file,
static bool static bool
plain_remove_bookmark(zathura_database_t* db, const char* file, const char* plain_remove_bookmark(zathura_database_t* db, const char* file, const char*
GIRARA_UNUSED(id)) GIRARA_UNUSED(id))
{ {
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db); zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->bookmarks == NULL || priv->bookmark_path == NULL) { if (priv->bookmarks == NULL || priv->bookmark_path == NULL) {
@ -344,8 +343,8 @@ plain_load_bookmarks(zathura_database_t* db, const char* file)
} }
girara_list_t* result = girara_sorted_list_new2((girara_compare_function_t) girara_list_t* result = girara_sorted_list_new2((girara_compare_function_t)
zathura_bookmarks_compare, (girara_free_function_t) zathura_bookmarks_compare, (girara_free_function_t)
zathura_bookmark_free); zathura_bookmark_free);
gsize length; gsize length;
char** keys = g_key_file_get_keys(priv->bookmarks, name, &length, NULL); char** keys = g_key_file_get_keys(priv->bookmarks, name, &length, NULL);
@ -372,7 +371,7 @@ plain_load_bookmarks(zathura_database_t* db, const char* file)
static bool static bool
plain_set_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t* plain_set_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t*
file_info) file_info)
{ {
zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db); zathura_plaindatabase_private_t* priv = ZATHURA_PLAINDATABASE_GET_PRIVATE(db);
if (priv->history == NULL || file_info == NULL || file == NULL) { if (priv->history == NULL || file_info == NULL || file == NULL) {
@ -409,7 +408,7 @@ plain_set_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t*
static bool static bool
plain_get_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t* plain_get_fileinfo(zathura_database_t* db, const char* file, zathura_fileinfo_t*
file_info) file_info)
{ {
if (db == NULL || file == NULL || file_info == NULL) { if (db == NULL || file == NULL || file_info == NULL) {
return false; return false;
@ -519,9 +518,9 @@ zathura_db_read_key_file_from_file(const char* path)
GError* error = NULL; GError* error = NULL;
if (g_key_file_load_from_data(key_file, content, contentlen, if (g_key_file_load_from_data(key_file, content, contentlen,
G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &error) == G_KEY_FILE_KEEP_COMMENTS | G_KEY_FILE_KEEP_TRANSLATIONS, &error) ==
FALSE) { FALSE) {
if (error->code != 1) /* ignore empty file */ { if (error->code != 1) { /* ignore empty file */
free(content); free(content);
g_key_file_free(key_file); g_key_file_free(key_file);
g_error_free(error); g_error_free(error);
@ -568,7 +567,7 @@ zathura_db_write_key_file_to_file(const char* file, GKeyFile* key_file)
static void static void
cb_zathura_db_watch_file(GFileMonitor* UNUSED(monitor), GFile* file, GFile* UNUSED(other_file), cb_zathura_db_watch_file(GFileMonitor* UNUSED(monitor), GFile* file, GFile* UNUSED(other_file),
GFileMonitorEvent event, zathura_database_t* database) GFileMonitorEvent event, zathura_database_t* database)
{ {
if (event != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT || database == NULL) { if (event != G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT || database == NULL) {
return; return;

View file

@ -10,21 +10,21 @@
static void zathura_database_interface_init(ZathuraDatabaseInterface* iface); static void zathura_database_interface_init(ZathuraDatabaseInterface* iface);
G_DEFINE_TYPE_WITH_CODE(ZathuraSQLDatabase, zathura_sqldatabase, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE(ZathuraSQLDatabase, zathura_sqldatabase, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE(ZATHURA_TYPE_DATABASE, zathura_database_interface_init)) G_IMPLEMENT_INTERFACE(ZATHURA_TYPE_DATABASE, zathura_database_interface_init))
static void sqlite_finalize(GObject* object); static void sqlite_finalize(GObject* object);
static bool sqlite_add_bookmark(zathura_database_t* db, const char* file, static bool sqlite_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark); zathura_bookmark_t* bookmark);
static bool sqlite_remove_bookmark(zathura_database_t* db, const char* file, static bool sqlite_remove_bookmark(zathura_database_t* db, const char* file,
const char* id); const char* id);
static girara_list_t* sqlite_load_bookmarks(zathura_database_t* db, static girara_list_t* sqlite_load_bookmarks(zathura_database_t* db,
const char* file); const char* file);
static bool sqlite_set_fileinfo(zathura_database_t* db, const char* file, static bool sqlite_set_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info); zathura_fileinfo_t* file_info);
static bool sqlite_get_fileinfo(zathura_database_t* db, const char* file, static bool sqlite_get_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info); zathura_fileinfo_t* file_info);
static void sqlite_set_property(GObject* object, guint prop_id, static void sqlite_set_property(GObject* object, guint prop_id,
const GValue* value, GParamSpec* pspec); const GValue* value, GParamSpec* pspec);
typedef struct zathura_sqldatabase_private_s { typedef struct zathura_sqldatabase_private_s {
sqlite3* session; sqlite3* session;
@ -33,8 +33,7 @@ typedef struct zathura_sqldatabase_private_s {
#define ZATHURA_SQLDATABASE_GET_PRIVATE(obj) \ #define ZATHURA_SQLDATABASE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZATHURA_TYPE_SQLDATABASE, zathura_sqldatabase_private_t)) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), ZATHURA_TYPE_SQLDATABASE, zathura_sqldatabase_private_t))
enum enum {
{
PROP_0, PROP_0,
PROP_PATH PROP_PATH
}; };
@ -62,7 +61,7 @@ zathura_sqldatabase_class_init(ZathuraSQLDatabaseClass* class)
object_class->set_property = sqlite_set_property; object_class->set_property = sqlite_set_property;
g_object_class_install_property(object_class, PROP_PATH, 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_spec_string("path", "path", "path to the database", NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
} }
static void static void
@ -107,23 +106,23 @@ sqlite_db_init(ZathuraSQLDatabase* db, const char* path)
/* create bookmarks database */ /* create bookmarks database */
static const char SQL_BOOKMARK_INIT[] = static const char SQL_BOOKMARK_INIT[] =
"CREATE TABLE IF NOT EXISTS bookmarks (" "CREATE TABLE IF NOT EXISTS bookmarks ("
"file TEXT," "file TEXT,"
"id TEXT," "id TEXT,"
"page INTEGER," "page INTEGER,"
"PRIMARY KEY(file, id));"; "PRIMARY KEY(file, id));";
static const char SQL_FILEINFO_INIT[] = static const char SQL_FILEINFO_INIT[] =
"CREATE TABLE IF NOT EXISTS fileinfo (" "CREATE TABLE IF NOT EXISTS fileinfo ("
"file TEXT PRIMARY KEY," "file TEXT PRIMARY KEY,"
"page INTEGER," "page INTEGER,"
"offset INTEGER," "offset INTEGER,"
"scale FLOAT," "scale FLOAT,"
"rotation INTEGER," "rotation INTEGER,"
"pages_per_row INTEGER," "pages_per_row INTEGER,"
"first_page_column INTEGER," "first_page_column INTEGER,"
"position_x FLOAT," "position_x FLOAT,"
"position_y FLOAT" "position_y FLOAT"
");"; ");";
static const char SQL_FILEINFO_ALTER[] = static const char SQL_FILEINFO_ALTER[] =
"ALTER TABLE fileinfo ADD COLUMN pages_per_row INTEGER;" "ALTER TABLE fileinfo ADD COLUMN pages_per_row INTEGER;"
@ -211,7 +210,7 @@ prepare_statement(sqlite3* session, const char* statement)
static bool static bool
sqlite_add_bookmark(zathura_database_t* db, const char* file, sqlite_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark) zathura_bookmark_t* bookmark)
{ {
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db); zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
@ -239,7 +238,7 @@ sqlite_add_bookmark(zathura_database_t* db, const char* file,
static bool static bool
sqlite_remove_bookmark(zathura_database_t* db, const char* file, const char* sqlite_remove_bookmark(zathura_database_t* db, const char* file, const char*
id) id)
{ {
zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db); zathura_sqldatabase_private_t* priv = ZATHURA_SQLDATABASE_GET_PRIVATE(db);
@ -284,7 +283,7 @@ sqlite_load_bookmarks(zathura_database_t* db, const char* file)
} }
girara_list_t* result = girara_sorted_list_new2((girara_compare_function_t) zathura_bookmarks_compare, girara_list_t* result = girara_sorted_list_new2((girara_compare_function_t) zathura_bookmarks_compare,
(girara_free_function_t) zathura_bookmark_free); (girara_free_function_t) zathura_bookmark_free);
while (sqlite3_step(stmt) == SQLITE_ROW) { while (sqlite3_step(stmt) == SQLITE_ROW) {
zathura_bookmark_t* bookmark = g_malloc0(sizeof(zathura_bookmark_t)); zathura_bookmark_t* bookmark = g_malloc0(sizeof(zathura_bookmark_t));
@ -302,7 +301,7 @@ sqlite_load_bookmarks(zathura_database_t* db, const char* file)
static bool static bool
sqlite_set_fileinfo(zathura_database_t* db, const char* file, sqlite_set_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info) zathura_fileinfo_t* file_info)
{ {
if (db == NULL || file == NULL || file_info == NULL) { if (db == NULL || file == NULL || file_info == NULL) {
return false; return false;
@ -340,7 +339,7 @@ sqlite_set_fileinfo(zathura_database_t* db, const char* file,
static bool static bool
sqlite_get_fileinfo(zathura_database_t* db, const char* file, sqlite_get_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info) zathura_fileinfo_t* file_info)
{ {
if (db == NULL || file == NULL || file_info == NULL) { if (db == NULL || file == NULL || file_info == NULL) {
return false; return false;

View file

@ -21,7 +21,7 @@ zathura_db_free(zathura_database_t* db)
bool bool
zathura_db_add_bookmark(zathura_database_t* db, const char* file, zathura_db_add_bookmark(zathura_database_t* db, const char* file,
zathura_bookmark_t* bookmark) zathura_bookmark_t* bookmark)
{ {
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && bookmark != NULL, false); g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && bookmark != NULL, false);
@ -30,7 +30,7 @@ zathura_db_add_bookmark(zathura_database_t* db, const char* file,
bool bool
zathura_db_remove_bookmark(zathura_database_t* db, const char* file, const char* zathura_db_remove_bookmark(zathura_database_t* db, const char* file, const char*
id) id)
{ {
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && id != NULL, false); g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && id != NULL, false);
@ -45,9 +45,9 @@ zathura_db_load_bookmarks(zathura_database_t* db, const char* file)
return ZATHURA_DATABASE_GET_INTERFACE(db)->load_bookmarks(db, file); return ZATHURA_DATABASE_GET_INTERFACE(db)->load_bookmarks(db, file);
} }
bool bool
zathura_db_set_fileinfo(zathura_database_t* db, const char* file, zathura_db_set_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info) zathura_fileinfo_t* file_info)
{ {
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && file_info != NULL, false); g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && file_info != NULL, false);
@ -56,7 +56,7 @@ zathura_db_set_fileinfo(zathura_database_t* db, const char* file,
bool bool
zathura_db_get_fileinfo(zathura_database_t* db, const char* file, zathura_db_get_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info) zathura_fileinfo_t* file_info)
{ {
g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && file_info != NULL, false); g_return_val_if_fail(ZATHURA_IS_DATABASE(db) && file != NULL && file_info != NULL, false);

View file

@ -36,8 +36,7 @@ static const gchar* guess_type(const char* path);
/** /**
* Document * Document
*/ */
struct zathura_document_s struct zathura_document_s {
{
char* file_path; /**< File path of the document */ char* file_path; /**< File path of the document */
const char* password; /**< Password of the document */ const char* password; /**< Password of the document */
unsigned int current_page_number; /**< Current page number */ unsigned int current_page_number; /**< Current page number */
@ -62,7 +61,7 @@ struct zathura_document_s
zathura_document_t* zathura_document_t*
zathura_document_open(zathura_plugin_manager_t* plugin_manager, const char* zathura_document_open(zathura_plugin_manager_t* plugin_manager, const char*
path, const char* password, zathura_error_t* error) path, const char* password, zathura_error_t* error)
{ {
if (path == NULL) { if (path == NULL) {
return NULL; return NULL;
@ -390,6 +389,34 @@ zathura_document_set_page_offset(zathura_document_t* document, unsigned int page
} }
} }
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);
unsigned int number_of_pages =
zathura_document_get_number_of_pages(document);
*width = 0;
*height = 0;
/* Get the size of each cell of the table/grid, assuming it is homogeneous
* (i.e. each cell has the same dimensions. */
for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) {
zathura_page_t* page = zathura_document_get_page(document, page_id);
if (page == NULL)
continue;
unsigned int page_width = 0, page_height = 0;
page_calc_height_width(page, &page_height, &page_width, true);
if (*width < page_width)
*width = page_width;
if (*height < page_height)
*height = page_height;
}
}
zathura_error_t zathura_error_t
zathura_document_save_as(zathura_document_t* document, const char* path) zathura_document_save_as(zathura_document_t* document, const char* path)
{ {
@ -511,17 +538,18 @@ guess_type(const char* path)
const int fd = fileno(f); const int fd = fileno(f);
guchar* content = NULL; guchar* content = NULL;
size_t length = 0u; size_t length = 0u;
while (uncertain == TRUE && length < GT_MAX_READ) { ssize_t bytes_read = -1;
while (uncertain == TRUE && length < GT_MAX_READ && bytes_read != 0) {
g_free((void*)content_type); g_free((void*)content_type);
content_type = NULL; content_type = NULL;
content = g_realloc(content, length + BUFSIZ); content = g_realloc(content, length + BUFSIZ);
const ssize_t r = read(fd, content + length, BUFSIZ); bytes_read = read(fd, content + length, BUFSIZ);
if (r == -1) { if (bytes_read == -1) {
break; break;
} }
length += r; length += bytes_read;
content_type = g_content_type_guess(NULL, content, length, &uncertain); content_type = g_content_type_guess(NULL, content, length, &uncertain);
girara_debug("new guess: %s uncertain: %d, read: %zu\n", content_type, uncertain, length); girara_debug("new guess: %s uncertain: %d, read: %zu\n", content_type, uncertain, length);
} }

View file

@ -93,7 +93,7 @@ void zathura_document_set_current_page_number(zathura_document_t* document, unsi
* Returns the current scale value of the document * Returns the current scale value of the document
* *
* @param document The document * @param document The document
* @return The current scale value * @return The current scale value
*/ */
double zathura_document_get_scale(zathura_document_t* document); double zathura_document_get_scale(zathura_document_t* document);
@ -125,7 +125,7 @@ void zathura_document_set_rotation(zathura_document_t* document, unsigned int ro
* Returns the adjust mode of the document * Returns the adjust mode of the document
* *
* @param document The document * @param document The document
* @return The adjust mode * @return The adjust mode
*/ */
zathura_adjust_mode_t zathura_document_get_adjust_mode(zathura_document_t* document); zathura_adjust_mode_t zathura_document_get_adjust_mode(zathura_document_t* document);
@ -169,6 +169,17 @@ void* zathura_document_get_data(zathura_document_t* document);
*/ */
void zathura_document_set_data(zathura_document_t* document, void* data); void zathura_document_set_data(zathura_document_t* document, void* data);
/**
* Computes the size of a cell in the document's layout table, assuming 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);
/** /**
* Save the document * Save the document
* *

65
links.c
View file

@ -10,8 +10,7 @@
#include "document.h" #include "document.h"
#include "utils.h" #include "utils.h"
struct zathura_link_s struct zathura_link_s {
{
zathura_rectangle_t position; /**< Position of the link */ zathura_rectangle_t position; /**< Position of the link */
zathura_link_type_t type; /**< Link type */ zathura_link_type_t type; /**< Link type */
zathura_link_target_t target; /**< Link target */ zathura_link_target_t target; /**< Link target */
@ -23,7 +22,7 @@ static void link_launch(zathura_t* zathura, zathura_link_t* link);
zathura_link_t* zathura_link_t*
zathura_link_new(zathura_link_type_t type, zathura_rectangle_t position, zathura_link_new(zathura_link_type_t type, zathura_rectangle_t position,
zathura_link_target_t target) zathura_link_target_t target)
{ {
zathura_link_t* link = g_malloc0(sizeof(zathura_link_t)); zathura_link_t* link = g_malloc0(sizeof(zathura_link_t));
@ -122,23 +121,25 @@ zathura_link_evaluate(zathura_t* zathura, zathura_link_t* link)
switch (link->type) { switch (link->type) {
case ZATHURA_LINK_GOTO_DEST: case ZATHURA_LINK_GOTO_DEST:
switch (link->target.destination_type) { if (link->target.destination_type != ZATHURA_LINK_DESTINATION_UNKNOWN) {
case ZATHURA_LINK_DESTINATION_XYZ: { if (link->target.scale != 0) {
if (link->target.scale != 0) { zathura_document_set_scale(zathura->document, link->target.scale);
zathura_document_set_scale(zathura->document, link->target.scale); }
}
/* get page */ /* get page */
zathura_page_t* page = zathura_document_get_page(zathura->document, zathura_page_t* page = zathura_document_get_page(zathura->document,
link->target.page_number); link->target.page_number);
if (page == NULL) { if (page == NULL) {
return; return;
} }
/* get page offset */ zathura_document_set_current_page_number(zathura->document, link->target.page_number);
page_offset_t offset;
page_calculate_offset(zathura, page, &offset);
/* get page offset */
page_offset_t offset;
page_calculate_offset(zathura, page, &offset);
if (link->target.destination_type == ZATHURA_LINK_DESTINATION_XYZ) {
if (link->target.left != -1) { if (link->target.left != -1) {
offset.x += link->target.left * zathura_document_get_scale(zathura->document); offset.x += link->target.left * zathura_document_get_scale(zathura->document);
} }
@ -146,12 +147,10 @@ zathura_link_evaluate(zathura_t* zathura, zathura_link_t* link)
if (link->target.top != -1) { if (link->target.top != -1) {
offset.y += link->target.top * zathura_document_get_scale(zathura->document); offset.y += link->target.top * zathura_document_get_scale(zathura->document);
} }
}
position_set_delayed(zathura, offset.x, offset.y); position_set_delayed(zathura, offset.x, offset.y);
} statusbar_page_number_update(zathura);
break;
default:
break;
} }
break; break;
case ZATHURA_LINK_GOTO_REMOTE: case ZATHURA_LINK_GOTO_REMOTE:
@ -170,6 +169,28 @@ zathura_link_evaluate(zathura_t* zathura, zathura_link_t* link)
} }
} }
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 static void
link_remote(zathura_t* zathura, const char* file) link_remote(zathura_t* zathura, const char* file)
{ {

View file

@ -56,4 +56,12 @@ zathura_link_target_t zathura_link_get_target(zathura_link_t* link);
*/ */
void zathura_link_evaluate(zathura_t* zathura, zathura_link_t* 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 #endif // LINK_H

2
main.c
View file

@ -111,7 +111,7 @@ main(int argc, char* argv[])
} }
/* Enable/Disable synctex support */ /* Enable/Disable synctex support */
zathura_set_syntex(zathura, synctex); zathura_set_synctex(zathura, synctex);
/* Print version */ /* Print version */
if (print_version == true) { if (print_version == true) {

92
marks.c
View file

@ -28,7 +28,7 @@ struct zathura_mark_s {
bool bool
sc_mark_add(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_mark_add(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, FALSE); g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->gtk.view != NULL, FALSE); g_return_val_if_fail(session->gtk.view != NULL, FALSE);
@ -36,14 +36,14 @@ sc_mark_add(girara_session_t* session, girara_argument_t* UNUSED(argument),
/* redirect signal handler */ /* redirect signal handler */
g_signal_handler_disconnect(G_OBJECT(session->gtk.view), session->signals.view_key_pressed); 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", 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); G_CALLBACK(cb_marks_view_key_press_event_add), session);
return true; return true;
} }
bool bool
sc_mark_evaluate(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_mark_evaluate(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, FALSE); g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->gtk.view != NULL, FALSE); g_return_val_if_fail(session->gtk.view != NULL, FALSE);
@ -51,14 +51,14 @@ sc_mark_evaluate(girara_session_t* session, girara_argument_t* UNUSED(argument),
/* redirect signal handler */ /* redirect signal handler */
g_signal_handler_disconnect(G_OBJECT(session->gtk.view), session->signals.view_key_pressed); 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", 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); G_CALLBACK(cb_marks_view_key_press_event_evaluate), session);
return true; return true;
} }
bool bool
cb_marks_view_key_press_event_add(GtkWidget* UNUSED(widget), GdkEventKey* event, cb_marks_view_key_press_event_add(GtkWidget* UNUSED(widget), GdkEventKey* event,
girara_session_t* session) girara_session_t* session)
{ {
g_return_val_if_fail(session != NULL, FALSE); g_return_val_if_fail(session != NULL, FALSE);
g_return_val_if_fail(session->gtk.view != NULL, FALSE); g_return_val_if_fail(session->gtk.view != NULL, FALSE);
@ -68,11 +68,11 @@ cb_marks_view_key_press_event_add(GtkWidget* UNUSED(widget), GdkEventKey* event,
/* reset signal handler */ /* reset signal handler */
g_signal_handler_disconnect(G_OBJECT(session->gtk.view), session->signals.view_key_pressed); 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", 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); G_CALLBACK(girara_callback_view_key_press_event), session);
/* evaluate key */ /* evaluate key */
if (((event->keyval >= 0x41 && event->keyval <= 0x5A) || (event->keyval >= if (((event->keyval >= 0x41 && event->keyval <= 0x5A) || (event->keyval >=
0x61 && event->keyval <= 0x7A)) == false) { 0x61 && event->keyval <= 0x7A)) == false) {
return false; return false;
} }
@ -92,11 +92,11 @@ bool cb_marks_view_key_press_event_evaluate(GtkWidget* UNUSED(widget), GdkEventK
/* reset signal handler */ /* reset signal handler */
g_signal_handler_disconnect(G_OBJECT(session->gtk.view), session->signals.view_key_pressed); 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", 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); G_CALLBACK(girara_callback_view_key_press_event), session);
/* evaluate key */ /* evaluate key */
if (((event->keyval >= 0x41 && event->keyval <= 0x5A) || (event->keyval >= if (((event->keyval >= 0x41 && event->keyval <= 0x5A) || (event->keyval >=
0x61 && event->keyval <= 0x7A)) == false) { 0x61 && event->keyval <= 0x7A)) == false) {
return true; return true;
} }
@ -129,7 +129,7 @@ cmd_marks_add(girara_session_t* session, girara_list_t* argument_list)
char key = key_string[0]; char key = key_string[0];
if (((key >= 0x41 && key <= 0x5A) || (key >= if (((key >= 0x41 && key <= 0x5A) || (key >=
0x61 && key <= 0x7A)) == false) { 0x61 && key <= 0x7A)) == false) {
return false; return false;
} }
@ -154,32 +154,32 @@ cmd_marks_delete(girara_session_t* session, girara_list_t* argument_list)
} }
GIRARA_LIST_FOREACH(argument_list, char*, iter, key_string) GIRARA_LIST_FOREACH(argument_list, char*, iter, key_string)
if (key_string == NULL) { if (key_string == NULL) {
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; continue;
} }
for (unsigned int i = 0; i < strlen(key_string); i++) { /* search for existing mark */
char key = key_string[i]; girara_list_iterator_t* mark_iter = girara_list_iterator(zathura->global.marks);
if (((key >= 0x41 && key <= 0x5A) || (key >= do {
0x61 && key <= 0x7A)) == false) { zathura_mark_t* mark = (zathura_mark_t*) girara_list_iterator_data(mark_iter);
if (mark == NULL) {
continue; continue;
} }
/* search for existing mark */ if (mark->key == key) {
girara_list_iterator_t* mark_iter = girara_list_iterator(zathura->global.marks); girara_list_remove(zathura->global.marks, mark);
do { continue;
zathura_mark_t* mark = (zathura_mark_t*) girara_list_iterator_data(mark_iter); }
if (mark == NULL) { } while (girara_list_iterator_next(mark_iter) != NULL);
continue; girara_list_iterator_free(mark_iter);
} }
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); GIRARA_LIST_FOREACH_END(argument_list, char*, iter, key_string);
return true; return true;
@ -206,12 +206,12 @@ mark_add(zathura_t* zathura, int key)
/* search for existing mark */ /* search for existing mark */
GIRARA_LIST_FOREACH(zathura->global.marks, zathura_mark_t*, iter, mark) GIRARA_LIST_FOREACH(zathura->global.marks, zathura_mark_t*, iter, mark)
if (mark->key == key) { if (mark->key == key) {
mark->position_x = position_x; mark->position_x = position_x;
mark->position_y = position_y; mark->position_y = position_y;
mark->scale = scale; mark->scale = scale;
return; return;
} }
GIRARA_LIST_FOREACH_END(zathura->global.marks, zathura_mark_t*, iter, mark); GIRARA_LIST_FOREACH_END(zathura->global.marks, zathura_mark_t*, iter, mark);
/* add new mark */ /* add new mark */
@ -234,19 +234,19 @@ mark_evaluate(zathura_t* zathura, int key)
/* search for existing mark */ /* search for existing mark */
GIRARA_LIST_FOREACH(zathura->global.marks, zathura_mark_t*, iter, mark) GIRARA_LIST_FOREACH(zathura->global.marks, zathura_mark_t*, iter, mark)
if (mark != NULL && mark->key == key) { if (mark != NULL && mark->key == key) {
double old_scale = zathura_document_get_scale(zathura->document); double old_scale = zathura_document_get_scale(zathura->document);
zathura_document_set_scale(zathura->document, mark->scale); zathura_document_set_scale(zathura->document, mark->scale);
readjust_view_after_zooming(zathura, old_scale, true); readjust_view_after_zooming(zathura, old_scale, true);
render_all(zathura); render_all(zathura);
position_set_delayed(zathura, mark->position_x, mark->position_y); position_set_delayed(zathura, mark->position_x, mark->position_y);
cb_view_vadjustment_value_changed(NULL, zathura); cb_view_vadjustment_value_changed(NULL, zathura);
zathura->global.update_page_number = true; zathura->global.update_page_number = true;
return; return;
} }
GIRARA_LIST_FOREACH_END(zathura->global.marks, zathura_mark_t*, iter, mark); GIRARA_LIST_FOREACH_END(zathura->global.marks, zathura_mark_t*, iter, mark);
} }

View file

@ -74,8 +74,7 @@ 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_copy(GtkMenuItem* item, ZathuraPage* page);
static void cb_menu_image_save(GtkMenuItem* item, ZathuraPage* page); static void cb_menu_image_save(GtkMenuItem* item, ZathuraPage* page);
enum properties_e enum properties_e {
{
PROP_0, PROP_0,
PROP_PAGE, PROP_PAGE,
PROP_ZATHURA, PROP_ZATHURA,
@ -115,25 +114,25 @@ zathura_page_widget_class_init(ZathuraPageClass* class)
/* add properties */ /* add properties */
g_object_class_install_property(object_class, PROP_PAGE, 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_spec_pointer("page", "page", "the page to draw", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property(object_class, PROP_ZATHURA, 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_spec_pointer("zathura", "zathura", "the zathura instance", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property(object_class, PROP_DRAW_LINKS, 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_spec_boolean("draw-links", "draw-links", "Set to true if links should be drawn", FALSE, G_PARAM_WRITABLE));
g_object_class_install_property(object_class, PROP_LINKS_OFFSET, 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_spec_int("offset-links", "offset-links", "Offset for the link numbers", 0, INT_MAX, 0, G_PARAM_WRITABLE));
g_object_class_install_property(object_class, PROP_LINKS_NUMBER, 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_spec_int("number-of-links", "number-of-links", "Number of links", 0, INT_MAX, 0, G_PARAM_READABLE));
g_object_class_install_property(object_class, PROP_SEARCH_RESULTS, 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_spec_pointer("search-results", "search-results", "Set to the list of search results", G_PARAM_WRITABLE | G_PARAM_READABLE));
g_object_class_install_property(object_class, PROP_SEARCH_RESULTS_CURRENT, 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_spec_int("search-current", "search-current", "The current search result", -1, INT_MAX, 0, G_PARAM_WRITABLE | G_PARAM_READABLE));
g_object_class_install_property(object_class, PROP_SEARCH_RESULTS_LENGTH, 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_spec_int("search-length", "search-length", "The number of search results", -1, INT_MAX, 0, G_PARAM_READABLE));
g_object_class_install_property(object_class, PROP_DRAW_SEACH_RESULTS, g_object_class_install_property(object_class, PROP_DRAW_SEACH_RESULTS,
g_param_spec_boolean("draw-search-results", "draw-search-results", "Set to true if search results should be drawn", FALSE, G_PARAM_WRITABLE)); g_param_spec_boolean("draw-search-results", "draw-search-results", "Set to true if search results should be drawn", FALSE, G_PARAM_WRITABLE));
g_object_class_install_property(object_class, PROP_LAST_VIEW, g_object_class_install_property(object_class, PROP_LAST_VIEW,
g_param_spec_int("last-view", "last-view", "Last time the page has been viewed", -1, INT_MAX, 0, G_PARAM_READABLE)); g_param_spec_int("last-view", "last-view", "Last time the page has been viewed", -1, INT_MAX, 0, G_PARAM_READABLE));
} }
static void static void
@ -167,7 +166,7 @@ zathura_page_widget_init(ZathuraPage* widget)
/* we want mouse events */ /* we want mouse events */
gtk_widget_add_events(GTK_WIDGET(widget), gtk_widget_add_events(GTK_WIDGET(widget),
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK); GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK);
} }
GtkWidget* GtkWidget*
@ -225,10 +224,10 @@ zathura_page_widget_set_property(GObject* object, guint prop_id, const GValue* v
if (priv->links.retrieved == true && priv->links.list != NULL) { if (priv->links.retrieved == true && priv->links.list != NULL) {
GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link) GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link)
if (link != NULL) { if (link != NULL) {
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, zathura_link_get_position(link)); zathura_rectangle_t rectangle = recalc_rectangle(priv->page, zathura_link_get_position(link));
redraw_rect(pageview, &rectangle); redraw_rect(pageview, &rectangle);
} }
GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link); GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link);
} }
break; break;
@ -381,24 +380,24 @@ zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
if (priv->links.draw == true && priv->links.n != 0) { if (priv->links.draw == true && priv->links.n != 0) {
unsigned int link_counter = 0; unsigned int link_counter = 0;
GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link) GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link)
if (link != NULL) { if (link != NULL) {
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, zathura_link_get_position(link)); zathura_rectangle_t rectangle = recalc_rectangle(priv->page, zathura_link_get_position(link));
/* draw position */ /* draw position */
GdkColor color = priv->zathura->ui.colors.highlight_color; GdkColor color = priv->zathura->ui.colors.highlight_color;
cairo_set_source_rgba(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0, transparency); cairo_set_source_rgba(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0, transparency);
cairo_rectangle(cairo, rectangle.x1, rectangle.y1, cairo_rectangle(cairo, rectangle.x1, rectangle.y1,
(rectangle.x2 - rectangle.x1), (rectangle.y2 - rectangle.y1)); (rectangle.x2 - rectangle.x1), (rectangle.y2 - rectangle.y1));
cairo_fill(cairo); cairo_fill(cairo);
/* draw text */ /* draw text */
cairo_set_source_rgba(cairo, 0, 0, 0, 1); cairo_set_source_rgba(cairo, 0, 0, 0, 1);
cairo_set_font_size(cairo, 10); cairo_set_font_size(cairo, 10);
cairo_move_to(cairo, rectangle.x1 + 1, rectangle.y2 - 1); cairo_move_to(cairo, rectangle.x1 + 1, rectangle.y2 - 1);
char* link_number = g_strdup_printf("%i", priv->links.offset + ++link_counter); char* link_number = g_strdup_printf("%i", priv->links.offset + ++link_counter);
cairo_show_text(cairo, link_number); cairo_show_text(cairo, link_number);
g_free(link_number); g_free(link_number);
} }
GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link); GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link);
} }
@ -406,20 +405,20 @@ zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
if (priv->search.list != NULL && priv->search.draw == true) { if (priv->search.list != NULL && priv->search.draw == true) {
int idx = 0; int idx = 0;
GIRARA_LIST_FOREACH(priv->search.list, zathura_rectangle_t*, iter, rect) GIRARA_LIST_FOREACH(priv->search.list, zathura_rectangle_t*, iter, rect)
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect); zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect);
/* draw position */ /* draw position */
if (idx == priv->search.current) { if (idx == priv->search.current) {
GdkColor color = priv->zathura->ui.colors.highlight_color_active; GdkColor color = priv->zathura->ui.colors.highlight_color_active;
cairo_set_source_rgba(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0, transparency); cairo_set_source_rgba(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0, transparency);
} else { } else {
GdkColor color = priv->zathura->ui.colors.highlight_color; GdkColor color = priv->zathura->ui.colors.highlight_color;
cairo_set_source_rgba(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0, transparency); cairo_set_source_rgba(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0, transparency);
} }
cairo_rectangle(cairo, rectangle.x1, rectangle.y1, cairo_rectangle(cairo, rectangle.x1, rectangle.y1,
(rectangle.x2 - rectangle.x1), (rectangle.y2 - rectangle.y1)); (rectangle.x2 - rectangle.x1), (rectangle.y2 - rectangle.y1));
cairo_fill(cairo); cairo_fill(cairo);
++idx; ++idx;
GIRARA_LIST_FOREACH_END(priv->search.list, zathura_rectangle_t*, iter, rect); GIRARA_LIST_FOREACH_END(priv->search.list, zathura_rectangle_t*, iter, rect);
} }
/* draw selection */ /* draw selection */
@ -427,7 +426,7 @@ zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
GdkColor color = priv->zathura->ui.colors.highlight_color; GdkColor color = priv->zathura->ui.colors.highlight_color;
cairo_set_source_rgba(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0, transparency); cairo_set_source_rgba(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0, transparency);
cairo_rectangle(cairo, priv->mouse.selection.x1, priv->mouse.selection.y1, 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)); (priv->mouse.selection.x2 - priv->mouse.selection.x1), (priv->mouse.selection.y2 - priv->mouse.selection.y1));
cairo_fill(cairo); cairo_fill(cairo);
} }
} else { } else {
@ -503,12 +502,12 @@ zathura_page_widget_size_allocate(GtkWidget* widget, GdkRectangle* allocation)
static void static void
redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle) redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle)
{ {
/* cause the rect to be drawn */ /* cause the rect to be drawn */
GdkRectangle grect; GdkRectangle grect;
grect.x = rectangle->x1; grect.x = rectangle->x1;
grect.y = rectangle->y1; grect.y = rectangle->y1;
grect.width = rectangle->x2 - rectangle->x1; grect.width = (rectangle->x2 + 1) - rectangle->x1;
grect.height = rectangle->y2 - rectangle->y1; grect.height = (rectangle->y2 + 1) - rectangle->y1;
#if (GTK_MAJOR_VERSION == 3) #if (GTK_MAJOR_VERSION == 3)
gtk_widget_queue_draw_area(GTK_WIDGET(widget), grect.x, grect.y, grect.width, grect.height); gtk_widget_queue_draw_area(GTK_WIDGET(widget), grect.x, grect.y, grect.width, grect.height);
#else #else
@ -522,8 +521,8 @@ redraw_all_rects(ZathuraPage* widget, girara_list_t* rectangles)
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget); zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget);
GIRARA_LIST_FOREACH(rectangles, zathura_rectangle_t*, iter, rect) GIRARA_LIST_FOREACH(rectangles, zathura_rectangle_t*, iter, rect)
zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect); zathura_rectangle_t rectangle = recalc_rectangle(priv->page, *rect);
redraw_rect(widget, &rectangle); redraw_rect(widget, &rectangle);
GIRARA_LIST_FOREACH_END(rectangles, zathura_recantgle_t*, iter, rect); GIRARA_LIST_FOREACH_END(rectangles, zathura_recantgle_t*, iter, rect);
} }
@ -550,6 +549,10 @@ cb_zathura_page_widget_button_press_event(GtkWidget* widget, GdkEventButton* but
zathura_page_widget_private_t* priv = ZATHURA_PAGE_GET_PRIVATE(widget); 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 == 1) { /* left click */ if (button->button == 1) { /* left click */
if (button->type == GDK_BUTTON_PRESS) { if (button->type == GDK_BUTTON_PRESS) {
/* start the selection */ /* start the selection */
@ -603,11 +606,11 @@ cb_zathura_page_widget_button_release_event(GtkWidget* widget, GdkEventButton* b
if (priv->links.list != NULL && priv->links.n > 0) { if (priv->links.list != NULL && priv->links.n > 0) {
GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link) GIRARA_LIST_FOREACH(priv->links.list, zathura_link_t*, iter, link)
zathura_rectangle_t rect = recalc_rectangle(priv->page, zathura_link_get_position(link)); zathura_rectangle_t rect = recalc_rectangle(priv->page, zathura_link_get_position(link));
if (rect.x1 <= button->x && rect.x2 >= button->x if (rect.x1 <= button->x && rect.x2 >= button->x
&& rect.y1 <= button->y && rect.y2 >= button->y) { && rect.y1 <= button->y && rect.y2 >= button->y) {
zathura_link_evaluate(priv->zathura, link); zathura_link_evaluate(priv->zathura, link);
} }
GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link); GIRARA_LIST_FOREACH_END(priv->links.list, zathura_link_t*, iter, link);
} }
} else { } else {
@ -717,10 +720,10 @@ zathura_page_widget_popup_menu(GtkWidget* widget, GdkEventButton* event)
/* search for underlaying image */ /* search for underlaying image */
zathura_image_t* image = NULL; zathura_image_t* image = NULL;
GIRARA_LIST_FOREACH(priv->images.list, zathura_image_t*, iter, image_it) GIRARA_LIST_FOREACH(priv->images.list, zathura_image_t*, iter, image_it)
zathura_rectangle_t rect = recalc_rectangle(priv->page, image_it->position); 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) { if (rect.x1 <= event->x && rect.x2 >= event->x && rect.y1 <= event->y && rect.y2 >= event->y) {
image = image_it; image = image_it;
} }
GIRARA_LIST_FOREACH_END(priv->images.list, zathura_image_t*, iter, image_it); GIRARA_LIST_FOREACH_END(priv->images.list, zathura_image_t*, iter, image_it);
if (image == NULL) { if (image == NULL) {
@ -795,7 +798,7 @@ cb_menu_image_copy(GtkMenuItem* item, ZathuraPage* page)
cairo_destroy(cairo); cairo_destroy(cairo);
GdkPixbuf* pixbuf = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, 0, 0, 0, GdkPixbuf* pixbuf = gdk_pixbuf_get_from_drawable(NULL, pixmap, NULL, 0, 0, 0,
0, width, height); 0, width, height);
gtk_clipboard_set_image(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), pixbuf); gtk_clipboard_set_image(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), pixbuf);
gtk_clipboard_set_image(gtk_clipboard_get(GDK_SELECTION_PRIMARY), pixbuf); gtk_clipboard_set_image(gtk_clipboard_get(GDK_SELECTION_PRIMARY), pixbuf);
@ -819,11 +822,11 @@ cb_menu_image_save(GtkMenuItem* item, ZathuraPage* page)
unsigned int image_id = 1; unsigned int image_id = 1;
GIRARA_LIST_FOREACH(priv->images.list, zathura_image_t*, iter, image_it) GIRARA_LIST_FOREACH(priv->images.list, zathura_image_t*, iter, image_it)
if (image_it == priv->images.current) { if (image_it == priv->images.current) {
break; break;
} }
image_id++; image_id++;
GIRARA_LIST_FOREACH_END(priv->images.list, zathura_image_t*, iter, image_it); GIRARA_LIST_FOREACH_END(priv->images.list, zathura_image_t*, iter, image_it);
/* set command */ /* set command */

226
plugin.c
View file

@ -14,8 +14,7 @@
/** /**
* Document plugin structure * Document plugin structure
*/ */
struct zathura_plugin_s struct zathura_plugin_s {
{
girara_list_t* content_types; /**< List of supported content types */ girara_list_t* content_types; /**< List of supported content types */
zathura_plugin_register_function_t register_function; /**< Document open function */ zathura_plugin_register_function_t register_function; /**< Document open function */
zathura_plugin_functions_t functions; /**< Document functions */ zathura_plugin_functions_t functions; /**< Document functions */
@ -28,8 +27,7 @@ struct zathura_plugin_s
/** /**
* Plugin mapping * Plugin mapping
*/ */
typedef struct zathura_type_plugin_mapping_s typedef struct zathura_type_plugin_mapping_s {
{
const gchar* type; /**< Plugin type */ const gchar* type; /**< Plugin type */
zathura_plugin_t* plugin; /**< Mapped plugin */ zathura_plugin_t* plugin; /**< Mapped plugin */
} zathura_type_plugin_mapping_t; } zathura_type_plugin_mapping_t;
@ -37,8 +35,7 @@ typedef struct zathura_type_plugin_mapping_s
/** /**
* Plugin manager * Plugin manager
*/ */
struct zathura_plugin_manager_s struct zathura_plugin_manager_s {
{
girara_list_t* plugins; /**< List of plugins */ girara_list_t* plugins; /**< List of plugins */
girara_list_t* path; /**< List of plugin paths */ girara_list_t* path; /**< List of plugin paths */
girara_list_t* type_plugin_mapping; /**< List of type -> plugin mappings */ girara_list_t* type_plugin_mapping; /**< List of type -> plugin mappings */
@ -91,120 +88,117 @@ zathura_plugin_manager_load(zathura_plugin_manager_t* plugin_manager)
} }
GIRARA_LIST_FOREACH(plugin_manager->path, char*, iter, plugindir) GIRARA_LIST_FOREACH(plugin_manager->path, char*, iter, plugindir)
/* read all files in the plugin directory */ /* read all files in the plugin directory */
GDir* dir = g_dir_open(plugindir, 0, NULL); GDir* dir = g_dir_open(plugindir, 0, NULL);
if (dir == NULL) { if (dir == NULL) {
girara_error("could not open plugin directory: %s", plugindir); girara_error("could not open plugin directory: %s", plugindir);
girara_list_iterator_next(iter); girara_list_iterator_next(iter);
continue;
}
char* name = NULL;
while ((name = (char*) g_dir_read_name(dir)) != NULL) {
char* path = g_build_filename(plugindir, name, NULL);
if (g_file_test(path, G_FILE_TEST_IS_REGULAR) == 0) {
girara_debug("%s is not a regular file. Skipping.", path);
g_free(path);
continue; continue;
} }
char* name = NULL; zathura_plugin_t* plugin = NULL;
while ((name = (char*) g_dir_read_name(dir)) != NULL) {
char* path = g_build_filename(plugindir, name, NULL);
if (g_file_test(path, G_FILE_TEST_IS_REGULAR) == 0) {
girara_info("%s is not a regular file. Skipping.", path);
g_free(path);
continue;
}
zathura_plugin_t* plugin = NULL; /* load plugin */
GModule* handle = g_module_open(path, G_MODULE_BIND_LOCAL);
if (handle == NULL) {
girara_error("could not load plugin %s (%s)", path, g_module_error());
g_free(path);
continue;
}
/* load plugin */ /* resolve symbols and check API and ABI version*/
GModule* handle = g_module_open(path, G_MODULE_BIND_LOCAL); zathura_plugin_api_version_t api_version = NULL;
if (handle == NULL) { if (g_module_symbol(handle, PLUGIN_API_VERSION_FUNCTION, (gpointer*) &api_version) == FALSE ||
girara_error("could not load plugin %s (%s)", path, g_module_error()); api_version == NULL) {
g_free(path); girara_error("could not find '%s' function in plugin %s", PLUGIN_API_VERSION_FUNCTION, path);
continue; g_free(path);
} g_module_close(handle);
continue;
}
/* resolve symbols and check API and ABI version*/ if (api_version() != ZATHURA_API_VERSION) {
zathura_plugin_api_version_t api_version = NULL; girara_error("plugin %s has been built againt zathura with a different API version (plugin: %d, zathura: %d)",
if (g_module_symbol(handle, PLUGIN_API_VERSION_FUNCTION, (gpointer*) &api_version) == FALSE || path, api_version(), ZATHURA_API_VERSION);
api_version == NULL) g_free(path);
{ g_module_close(handle);
girara_error("could not find '%s' function in plugin %s", PLUGIN_API_VERSION_FUNCTION, path); continue;
g_free(path); }
g_module_close(handle);
continue;
}
if (api_version() != ZATHURA_API_VERSION) { zathura_plugin_abi_version_t abi_version = NULL;
girara_error("plugin %s has been built againt zathura with a different API version (plugin: %d, zathura: %d)", if (g_module_symbol(handle, PLUGIN_ABI_VERSION_FUNCTION, (gpointer*) &abi_version) == FALSE ||
path, api_version(), ZATHURA_API_VERSION); abi_version == NULL) {
g_free(path); girara_error("could not find '%s' function in plugin %s", PLUGIN_ABI_VERSION_FUNCTION, path);
g_module_close(handle); g_free(path);
continue; g_module_close(handle);
} continue;
}
zathura_plugin_abi_version_t abi_version = NULL; if (abi_version() != ZATHURA_ABI_VERSION) {
if (g_module_symbol(handle, PLUGIN_ABI_VERSION_FUNCTION, (gpointer*) &abi_version) == FALSE || girara_error("plugin %s has been built againt zathura with a different ABI version (plugin: %d, zathura: %d)",
abi_version == NULL) path, abi_version(), ZATHURA_ABI_VERSION);
{ g_free(path);
girara_error("could not find '%s' function in plugin %s", PLUGIN_ABI_VERSION_FUNCTION, path); g_module_close(handle);
g_free(path); continue;
g_module_close(handle); }
continue;
}
if (abi_version() != ZATHURA_ABI_VERSION) { zathura_plugin_register_service_t register_service = NULL;
girara_error("plugin %s has been built againt zathura with a different ABI version (plugin: %d, zathura: %d)", if (g_module_symbol(handle, PLUGIN_REGISTER_FUNCTION, (gpointer*) &register_service) == FALSE ||
path, abi_version(), ZATHURA_ABI_VERSION); register_service == NULL) {
g_free(path); girara_error("could not find '%s' function in plugin %s", PLUGIN_REGISTER_FUNCTION, path);
g_module_close(handle); g_free(path);
continue; g_module_close(handle);
} continue;
}
zathura_plugin_register_service_t register_service = NULL; plugin = g_malloc0(sizeof(zathura_plugin_t));
if (g_module_symbol(handle, PLUGIN_REGISTER_FUNCTION, (gpointer*) &register_service) == FALSE || plugin->content_types = girara_list_new2(g_free);
register_service == NULL) plugin->handle = handle;
{
girara_error("could not find '%s' function in plugin %s", PLUGIN_REGISTER_FUNCTION, path);
g_free(path);
g_module_close(handle);
continue;
}
plugin = g_malloc0(sizeof(zathura_plugin_t)); register_service(plugin);
plugin->content_types = girara_list_new2(g_free);
plugin->handle = handle;
register_service(plugin); /* register functions */
if (plugin->register_function == NULL) {
girara_error("plugin has no document functions register function");
g_free(path);
g_free(plugin);
g_module_close(handle);
continue;
}
/* register functions */ plugin->register_function(&(plugin->functions));
if (plugin->register_function == NULL) { plugin->path = path;
girara_error("plugin has no document functions register function");
g_free(path);
g_free(plugin);
g_module_close(handle);
continue;
}
plugin->register_function(&(plugin->functions)); bool ret = register_plugin(plugin_manager, plugin);
plugin->path = path; if (ret == false) {
girara_error("could not register plugin %s", path);
zathura_plugin_free(plugin);
} else {
girara_debug("successfully loaded plugin %s", path);
bool ret = register_plugin(plugin_manager, plugin); zathura_plugin_version_function_t plugin_major = NULL, plugin_minor = NULL, plugin_rev = NULL;
if (ret == false) { g_module_symbol(handle, PLUGIN_VERSION_MAJOR_FUNCTION, (gpointer*) &plugin_major);
girara_error("could not register plugin %s", path); g_module_symbol(handle, PLUGIN_VERSION_MINOR_FUNCTION, (gpointer*) &plugin_minor);
zathura_plugin_free(plugin); g_module_symbol(handle, PLUGIN_VERSION_REVISION_FUNCTION, (gpointer*) &plugin_rev);
} else { if (plugin_major != NULL && plugin_minor != NULL && plugin_rev != NULL) {
girara_info("successfully loaded plugin %s", path); plugin->version.major = plugin_major();
plugin->version.minor = plugin_minor();
zathura_plugin_version_function_t plugin_major = NULL, plugin_minor = NULL, plugin_rev = NULL; plugin->version.rev = plugin_rev();
g_module_symbol(handle, PLUGIN_VERSION_MAJOR_FUNCTION, (gpointer*) &plugin_major); girara_debug("plugin '%s': version %u.%u.%u", path,
g_module_symbol(handle, PLUGIN_VERSION_MINOR_FUNCTION, (gpointer*) &plugin_minor); plugin->version.major, plugin->version.minor,
g_module_symbol(handle, PLUGIN_VERSION_REVISION_FUNCTION, (gpointer*) &plugin_rev); plugin->version.rev);
if (plugin_major != NULL && plugin_minor != NULL && plugin_rev != NULL) {
plugin->version.major = plugin_major();
plugin->version.minor = plugin_minor();
plugin->version.rev = plugin_rev();
girara_debug("plugin '%s': version %u.%u.%u", path,
plugin->version.major, plugin->version.minor,
plugin->version.rev);
}
} }
} }
g_dir_close(dir); }
g_dir_close(dir);
GIRARA_LIST_FOREACH_END(zathura->plugins.path, char*, iter, plugindir); GIRARA_LIST_FOREACH_END(zathura->plugins.path, char*, iter, plugindir);
} }
@ -217,10 +211,10 @@ zathura_plugin_manager_get_plugin(zathura_plugin_manager_t* plugin_manager, cons
zathura_plugin_t* plugin = NULL; zathura_plugin_t* plugin = NULL;
GIRARA_LIST_FOREACH(plugin_manager->type_plugin_mapping, zathura_type_plugin_mapping_t*, iter, mapping) GIRARA_LIST_FOREACH(plugin_manager->type_plugin_mapping, zathura_type_plugin_mapping_t*, iter, mapping)
if (g_content_type_equals(type, mapping->type)) { if (g_content_type_equals(type, mapping->type)) {
plugin = mapping->plugin; plugin = mapping->plugin;
break; break;
} }
GIRARA_LIST_FOREACH_END(plugin_manager->type_plugin_mapping, zathura_type_plugin_mapping_t*, iter, mapping); GIRARA_LIST_FOREACH_END(plugin_manager->type_plugin_mapping, zathura_type_plugin_mapping_t*, iter, mapping);
return plugin; return plugin;
@ -272,11 +266,11 @@ register_plugin(zathura_plugin_manager_t* plugin_manager, zathura_plugin_t* plug
bool at_least_one = false; bool at_least_one = false;
GIRARA_LIST_FOREACH(plugin->content_types, gchar*, iter, type) GIRARA_LIST_FOREACH(plugin->content_types, gchar*, iter, type)
if (plugin_mapping_new(plugin_manager, type, plugin) == false) { if (plugin_mapping_new(plugin_manager, type, plugin) == false) {
girara_error("plugin: already registered for filetype %s\n", type); girara_error("plugin: already registered for filetype %s\n", type);
} else { } else {
at_least_one = true; at_least_one = true;
} }
GIRARA_LIST_FOREACH_END(plugin->content_types, gchar*, iter, type); GIRARA_LIST_FOREACH_END(plugin->content_types, gchar*, iter, type);
if (at_least_one == true) { if (at_least_one == true) {
@ -294,10 +288,10 @@ plugin_mapping_new(zathura_plugin_manager_t* plugin_manager, const gchar* type,
g_return_val_if_fail(plugin != NULL, false); g_return_val_if_fail(plugin != NULL, false);
GIRARA_LIST_FOREACH(plugin_manager->type_plugin_mapping, zathura_type_plugin_mapping_t*, iter, mapping) GIRARA_LIST_FOREACH(plugin_manager->type_plugin_mapping, zathura_type_plugin_mapping_t*, iter, mapping)
if (g_content_type_equals(type, mapping->type)) { if (g_content_type_equals(type, mapping->type)) {
girara_list_iterator_free(iter); girara_list_iterator_free(iter);
return false; return false;
} }
GIRARA_LIST_FOREACH_END(plugin_manager->type_plugin_mapping, zathura_type_plugin_mapping_t*, iter, mapping); GIRARA_LIST_FOREACH_END(plugin_manager->type_plugin_mapping, zathura_type_plugin_mapping_t*, iter, mapping);
zathura_type_plugin_mapping_t* mapping = g_malloc(sizeof(zathura_type_plugin_mapping_t)); zathura_type_plugin_mapping_t* mapping = g_malloc(sizeof(zathura_type_plugin_mapping_t));

View file

@ -4,10 +4,13 @@ PROJECT = zathura
GETTEXT_PACKAGE = $(PROJECT) GETTEXT_PACKAGE = $(PROJECT)
CATALOGS = $(wildcard *.po) CATALOGS = $(wildcard *.po)
LINGUAS ?= $(patsubst %.po, %, $(CATALOGS)) LINGUAS ?= $(patsubst %.po, %, $(CATALOGS))
ALINGUAS = $(shell find $(patsubst %, %.po, $(LINGUAS)) 2>/dev/null) ifeq ($(LINGUAS),)
ALINGUAS =
else
ALINGUAS = $(shell find $(patsubst %, %.po, $(LINGUAS)) 2>/dev/null)
endif
MOS = $(patsubst %, %/LC_MESSAGES/${GETTEXT_PACKAGE}.mo, $(patsubst %.po, %, $(ALINGUAS))) MOS = $(patsubst %, %/LC_MESSAGES/${GETTEXT_PACKAGE}.mo, $(patsubst %.po, %, $(ALINGUAS)))
include ../config.mk include ../config.mk
include ../common.mk include ../common.mk
@ -31,6 +34,7 @@ update-po: ${PROJECT}.pot
$(ECHO) updating po: files ${CATALOGS} $(ECHO) updating po: files ${CATALOGS}
$(QUIET)set -e && for f in ${CATALOGS} ; do \ $(QUIET)set -e && for f in ${CATALOGS} ; do \
intltool-update --dist --gettext-package=${PROJECT} `echo $$f | sed 's/\.po//'` ; \ intltool-update --dist --gettext-package=${PROJECT} `echo $$f | sed 's/\.po//'` ; \
sed -i 's/Report-Msgid-Bugs-To: \\n/Report-Msgid-Bugs-To: http:\/\/bugs.pwmt.org\\n/' "$$f" ; \
done done
%/LC_MESSAGES/${PROJECT}.mo: %.po %/LC_MESSAGES/${PROJECT}.mo: %.po

179
po/cs.po
View file

@ -4,8 +4,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-06-19 23:59+0200\n" "PO-Revision-Date: 2012-06-19 23:59+0200\n"
"Last-Translator: Martin Pelikan <pelikan@storkhole.cz>\n" "Last-Translator: Martin Pelikan <pelikan@storkhole.cz>\n"
"Language-Team: pwmt.org <mail@pwmt.org>\n" "Language-Team: pwmt.org <mail@pwmt.org>\n"
@ -14,23 +14,24 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Neplatný vstup: %s" msgstr "Neplatný vstup: %s"
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Neplatný index: %s" msgstr "Neplatný index: %s"
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Není otevřený žádný dokument." msgstr "Není otevřený žádný dokument."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Špatný počet argumentů." msgstr "Špatný počet argumentů."
@ -57,7 +58,7 @@ msgstr "Záložka smazána: %s"
#: ../commands.c:84 #: ../commands.c:84
#, c-format #, c-format
msgid "Failed to remove bookmark: %s" msgid "Failed to remove bookmark: %s"
msgstr "Nem¿¿u smazat zálo¿ku: %s" msgstr "Nemůžu smazat záložku: %s"
#: ../commands.c:110 #: ../commands.c:110
#, c-format #, c-format
@ -88,37 +89,37 @@ msgstr "Nepovedlo se uložit dokument."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Špatný počet argumentů." msgstr "Špatný počet argumentů."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Nepovedlo se zapsat p¿ílohu '%s' do '%s'." msgstr "Nepovedlo se zapsat přílohu '%s' do '%s'."
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Příloha '%s' zapsána do '%s'." msgstr "Příloha '%s' zapsána do '%s'."
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "Obrázek '%s' zapsán do '%s'." msgstr "Obrázek '%s' zapsán do '%s'."
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "Nepovedlo se zapsat obrázek '%s' do '%s'." msgstr "Nepovedlo se zapsat obrázek '%s' do '%s'."
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "Neznámý obrázek '%s'." msgstr "Neznámý obrázek '%s'."
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "Neznámá příloha nebo obrázek '%s'." msgstr "Neznámá příloha nebo obrázek '%s'."
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "Argumentem musí být číslo." msgstr "Argumentem musí být číslo."
@ -137,211 +138,241 @@ msgid "Images"
msgstr "Obrázky" msgstr "Obrázky"
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Databázový backend" msgstr "Databázový backend"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Zoom step" msgstr "Zoom step"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Mezery mezi stránkami" msgstr "Mezery mezi stránkami"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Počet stránek na řádek" msgstr "Počet stránek na řádek"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Scroll step" msgstr "Scroll step"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Oddálit" msgstr "Oddálit"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Přiblížit" msgstr "Přiblížit"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "Délka života skryté stránky v sekundách" msgstr "Délka života skryté stránky v sekundách"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "Počet sekund mezi čištěními cache" msgstr "Počet sekund mezi čištěními cache"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Přebarvuji do tmava" msgstr "Přebarvuji do tmava"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Přebarvuji do sv¿tla" msgstr "Přebarvuji do světla"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Barva zvýrazňovače" msgstr "Barva zvýrazňovače"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Barva zvýrazňovače (aktivní)" msgstr "Barva zvýrazňovače (aktivní)"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Přebarvit stránky" msgstr "Přebarvit stránky"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Scrollovat přes konce" msgstr "Scrollovat přes konce"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "" msgstr ""
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "" msgstr ""
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "" msgstr ""
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Průhlednost při zvýrazňování" msgstr "Průhlednost při zvýrazňování"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Vypisovat 'Načítám ...'" msgstr "Vypisovat 'Načítám ...'"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Přiblížení po otevření souboru" msgstr "Přiblížení po otevření souboru"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Zobrazovat skryté soubory" msgstr "Zobrazovat skryté soubory"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Zobrazovat adresáře" msgstr "Zobrazovat adresáře"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Vždy otevírat na první straně" msgstr "Vždy otevírat na první straně"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "Zvýrazňovat výsledky hledání" msgstr "Zvýrazňovat výsledky hledání"
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "Při abortu smazat výsledky hledání" msgstr "Při abortu smazat výsledky hledání"
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Přidat záložku" msgstr "Přidat záložku"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Smazat záložku" msgstr "Smazat záložku"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Vypsat záložky" msgstr "Vypsat záložky"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Zavřít tenhle soubor" msgstr "Zavřít tenhle soubor"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Zobrazit informace o souboru" msgstr "Zobrazit informace o souboru"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Zobrazit nápovědu" msgstr "Zobrazit nápovědu"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Otevřít dokument" msgstr "Otevřít dokument"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Zavřít zathuru" msgstr "Zavřít zathuru"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Tisknout dokument" msgstr "Tisknout dokument"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Uložit dokument" msgstr "Uložit dokument"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Uložit a přepsat dokument" msgstr "Uložit a přepsat dokument"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Uložit přílohy" msgstr "Uložit přílohy"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "" msgstr ""
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "Označit současnou pozici v dokumentu" msgstr "Označit současnou pozici v dokumentu"
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "Smazat vybrané značky" msgstr "Smazat vybrané značky"
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "Nezvýrazňovat výsledky tohoto hledání" msgstr "Nezvýrazňovat výsledky tohoto hledání"
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "Zvýrazňovat výsledky tohoto hledání" msgstr "Zvýrazňovat výsledky tohoto hledání"
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Nepovedlo se spustit xdg-open." msgstr "Nepovedlo se spustit xdg-open."
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "" msgstr ""
@ -378,27 +409,27 @@ msgstr "Zobrazit informace o souboru"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "Načítám ..." msgstr "Načítám ..."
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Vybraný text zkopírován do schránky: %s" msgstr "Vybraný text zkopírován do schránky: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Zkopíruj obrázek" msgstr "Zkopíruj obrázek"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "Ulož obrázek jako" msgstr "Ulož obrázek jako"
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Tenhle dokument neobsahuje žádné indexy" msgstr "Tenhle dokument neobsahuje žádné indexy"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Nepojmenovaný]" msgstr "[Nepojmenovaný]"

173
po/de.po
View file

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-08-05 16:08+0100\n" "PO-Revision-Date: 2012-08-05 16:08+0100\n"
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n" "Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
"Language-Team: pwmt.org <mail@pwmt.org>\n" "Language-Team: pwmt.org <mail@pwmt.org>\n"
@ -16,23 +16,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Ungültige Eingabe '%s' angegeben." msgstr "Ungültige Eingabe '%s' angegeben."
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Ungültiger Index '%s' angegeben." msgstr "Ungültiger Index '%s' angegeben."
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Kein Dokument geöffnet." msgstr "Kein Dokument geöffnet."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Ungültige Anzahl an Argumenten angegeben." msgstr "Ungültige Anzahl an Argumenten angegeben."
@ -90,37 +91,37 @@ msgstr "Konnte Dokument nicht speichern."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Ungültige Anzahl an Argumenten." msgstr "Ungültige Anzahl an Argumenten."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Konnte Anhang '%s' nicht nach '%s' schreiben." msgstr "Konnte Anhang '%s' nicht nach '%s' schreiben."
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Anhang '%s' nach '%s' geschrieben." msgstr "Anhang '%s' nach '%s' geschrieben."
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "Anhang '%s' nach '%s' geschrieben." msgstr "Anhang '%s' nach '%s' geschrieben."
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "Konnte Anhang '%s' nicht nach '%s' schreiben." msgstr "Konnte Anhang '%s' nicht nach '%s' schreiben."
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "Unbekanntes Bild '%s'." msgstr "Unbekanntes Bild '%s'."
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "Unbekannter Anhanng oder Bild '%s'." msgstr "Unbekannter Anhanng oder Bild '%s'."
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "Das Argument ist keine Zahl." msgstr "Das Argument ist keine Zahl."
@ -139,214 +140,244 @@ msgid "Images"
msgstr "Bilder" msgstr "Bilder"
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Datenbank Backend" msgstr "Datenbank Backend"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Vergrößerungsstufe" msgstr "Vergrößerungsstufe"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Abstand zwischen den Seiten" msgstr "Abstand zwischen den Seiten"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Anzahl der Seiten in einer Reihe" msgstr "Anzahl der Seiten in einer Reihe"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "Spalte der ersten Seite" msgstr "Spalte der ersten Seite"
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Schrittgröße beim Scrollen" msgstr "Schrittgröße beim Scrollen"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "Horizontale Schrittgröße beim Scrollen" msgstr "Horizontale Schrittgröße beim Scrollen"
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Minimale Vergrößerungsstufe" msgstr "Minimale Vergrößerungsstufe"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Maximale Vergrößerungsstufe" msgstr "Maximale Vergrößerungsstufe"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "Zeit (in Sekunden) bevor nicht sichtbare Seiten gelöscht werden" msgstr "Zeit (in Sekunden) bevor nicht sichtbare Seiten gelöscht werden"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "" msgstr ""
"Anzahl der Sekunden zwischen jeder Prüfung von nicht angezeigten Seiten" "Anzahl der Sekunden zwischen jeder Prüfung von nicht angezeigten Seiten"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Neufärben (Dunkle Farbe)" msgstr "Neufärben (Dunkle Farbe)"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Neufärben (Helle Farbe)" msgstr "Neufärben (Helle Farbe)"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Farbe für eine Markierung" msgstr "Farbe für eine Markierung"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Farbe für die aktuelle Markierung" msgstr "Farbe für die aktuelle Markierung"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Färbe die Seiten ein" msgstr "Färbe die Seiten ein"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
"Behalte beim Neuzeichnen den ursprünglichen Hue-Wert bei und stimme nur die " "Behalte beim Neuzeichnen den ursprünglichen Hue-Wert bei und stimme nur die "
"Helligkeit ab" "Helligkeit ab"
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Scroll-Umbruch" msgstr "Scroll-Umbruch"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "Gehe Anzahl der Seiten in einer Reihe weiter" msgstr "Gehe Anzahl der Seiten in einer Reihe weiter"
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "Horizontal zentrierter Zoom" msgstr "Horizontal zentrierter Zoom"
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "Zentriere Ergebnis horizontal" msgstr "Zentriere Ergebnis horizontal"
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Transparenz einer Markierung" msgstr "Transparenz einer Markierung"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Zeige 'Lädt...'-Text beim Zeichnen einer Seite" msgstr "Zeige 'Lädt...'-Text beim Zeichnen einer Seite"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Seite einpassen" msgstr "Seite einpassen"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Zeige versteckte Dateien und Ordner an" msgstr "Zeige versteckte Dateien und Ordner an"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Zeige Ordner an" msgstr "Zeige Ordner an"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Öffne Dokument immer auf der ersten Seite" msgstr "Öffne Dokument immer auf der ersten Seite"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "Hebe Suchergebnisse hervor" msgstr "Hebe Suchergebnisse hervor"
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "Lösche Suchergebnisse bei Abbruch" msgstr "Lösche Suchergebnisse bei Abbruch"
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "Verwende den Dateinamen der Datei im Fenstertitel" msgstr "Verwende den Dateinamen der Datei im Fenstertitel"
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Füge Lesezeichen hinzu" msgstr "Füge Lesezeichen hinzu"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Lösche ein Lesezeichen" msgstr "Lösche ein Lesezeichen"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Liste all Lesezeichen auf" msgstr "Liste all Lesezeichen auf"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Schließe das aktuelle Dokument" msgstr "Schließe das aktuelle Dokument"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Zeige Dokumentinformationen an" msgstr "Zeige Dokumentinformationen an"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Zeige Hilfe an" msgstr "Zeige Hilfe an"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Öffne Dokument" msgstr "Öffne Dokument"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Beende zathura" msgstr "Beende zathura"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Drucke Dokument" msgstr "Drucke Dokument"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Speichere Dokument" msgstr "Speichere Dokument"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Speichere Dokument (und überschreibe bestehende)" msgstr "Speichere Dokument (und überschreibe bestehende)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Speichere Anhänge" msgstr "Speichere Anhänge"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Setze den Seitenabstand" msgstr "Setze den Seitenabstand"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "Markiere aktuelle Position im Doukument" msgstr "Markiere aktuelle Position im Doukument"
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "Lösche angegebene Markierung" msgstr "Lösche angegebene Markierung"
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "Hebe aktuelle Suchergebnisse nicht hervor" msgstr "Hebe aktuelle Suchergebnisse nicht hervor"
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "Hebe aktuelle Suchergebnisse hervor" msgstr "Hebe aktuelle Suchergebnisse hervor"
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "Zeige Versionsinformationen an" msgstr "Zeige Versionsinformationen an"
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Konnte xdg-open nicht ausführen." msgstr "Konnte xdg-open nicht ausführen."
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr "Verknüpfung: Seite %d"
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr "Verknüpfung: %s"
#: ../links.c:190
msgid "Link: Invalid"
msgstr "Verknüpfung: ungültig"
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "Reparentiert zathura an das Fenster mit der xid" msgstr "Reparentiert zathura an das Fenster mit der xid"
@ -383,27 +414,27 @@ msgstr "Zeige Versionsinformationen an"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Synctex Editor (wird an synctex weitergeleitet)" msgstr "Synctex Editor (wird an synctex weitergeleitet)"
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "Lädt..." msgstr "Lädt..."
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Der gewählte Text wurde in die Zwischenablage kopiert: %s" msgstr "Der gewählte Text wurde in die Zwischenablage kopiert: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Bild kopieren" msgstr "Bild kopieren"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "Bild speichern als" msgstr "Bild speichern als"
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Dieses Dokument beinhaltet kein Inhaltsverzeichnis." msgstr "Dieses Dokument beinhaltet kein Inhaltsverzeichnis."
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Kein Name]" msgstr "[Kein Name]"

178
po/eo.po
View file

@ -6,34 +6,36 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bt.pwmt.org/\n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-08-09 13:21+0000\n" "PO-Revision-Date: 2012-08-09 13:21+0000\n"
"Last-Translator: norbux <manelsales@ono.com>\n" "Last-Translator: norbux <manelsales@ono.com>\n"
"Language-Team: Esperanto (http://www.transifex.com/projects/p/zathura/language/eo/)\n" "Language-Team: Esperanto (http://www.transifex.com/projects/p/zathura/"
"language/eo/)\n"
"Language: eo\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: eo\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Nevalida enigo '%s' uzata." msgstr "Nevalida enigo '%s' uzata."
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Nevalida indekso '%s' uzata." msgstr "Nevalida indekso '%s' uzata."
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Neniu dokumento malfermita." msgstr "Neniu dokumento malfermita."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Nevalida nombro da argumentoj uzata." msgstr "Nevalida nombro da argumentoj uzata."
@ -91,37 +93,37 @@ msgstr "Neeble konservi dokumenton."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Nevalida nombro da argumentoj." msgstr "Nevalida nombro da argumentoj."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Neeble skribi kunsendaĵon '%s' en '%s'." msgstr "Neeble skribi kunsendaĵon '%s' en '%s'."
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Skribis kunsendaĵon '%s' en '%s'." msgstr "Skribis kunsendaĵon '%s' en '%s'."
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "Skribis kunsendaĵon '%s' en '%s'." msgstr "Skribis kunsendaĵon '%s' en '%s'."
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "Neeble skribi kunsendaĵon '%s' en '%s'." msgstr "Neeble skribi kunsendaĵon '%s' en '%s'."
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "Nekonata bildo '%s'." msgstr "Nekonata bildo '%s'."
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr ""
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "Argumento devas esti nombro." msgstr "Argumento devas esti nombro."
@ -140,211 +142,241 @@ msgid "Images"
msgstr "Bildoj" msgstr "Bildoj"
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "" msgstr ""
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Zompaŝo" msgstr "Zompaŝo"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Interpaĝa plenigo" msgstr "Interpaĝa plenigo"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Nombro da paĝoj po vico" msgstr "Nombro da paĝoj po vico"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Rulumpaŝo" msgstr "Rulumpaŝo"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Mimimuma zomo" msgstr "Mimimuma zomo"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Maksimuma zomo" msgstr "Maksimuma zomo"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "Vivdaŭro (sekunda) de kaŝita paĝo" msgstr "Vivdaŭro (sekunda) de kaŝita paĝo"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "Nombro da sekundoj inter repurigo de kaŝmemoro" msgstr "Nombro da sekundoj inter repurigo de kaŝmemoro"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Rekolorigo (malhela koloro)" msgstr "Rekolorigo (malhela koloro)"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Rekolorigo (hela koloro)" msgstr "Rekolorigo (hela koloro)"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Koloro por fonlumo" msgstr "Koloro por fonlumo"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Koloro por fonlumo (aktiva)" msgstr "Koloro por fonlumo (aktiva)"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Rekoloru paĝojn" msgstr "Rekoloru paĝojn"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Ĉirkaŭflua rulumado" msgstr "Ĉirkaŭflua rulumado"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "" msgstr ""
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "" msgstr ""
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "" msgstr ""
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Travidebleco por fonlumo" msgstr "Travidebleco por fonlumo"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Bildigu 'Ŝargado ...'" msgstr "Bildigu 'Ŝargado ...'"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Adaptaĵo ĉe malfermo de dosiero" msgstr "Adaptaĵo ĉe malfermo de dosiero"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Montru kaŝitajn dosierojn kaj -ujojn" msgstr "Montru kaŝitajn dosierojn kaj -ujojn"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Montru dosierujojn" msgstr "Montru dosierujojn"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Ĉiam malfermu ĉe unua paĝo" msgstr "Ĉiam malfermu ĉe unua paĝo"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr ""
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr ""
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Aldonu paĝosignon" msgstr "Aldonu paĝosignon"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Forigu paĝosignon" msgstr "Forigu paĝosignon"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Listigu ĉiujn paĝosignojn" msgstr "Listigu ĉiujn paĝosignojn"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Fermu nunan dosieron" msgstr "Fermu nunan dosieron"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Montru dosiera informacio" msgstr "Montru dosiera informacio"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Montru helpon" msgstr "Montru helpon"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Malfermu dokumenton" msgstr "Malfermu dokumenton"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Fermu zathura" msgstr "Fermu zathura"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Presu dokumenton" msgstr "Presu dokumenton"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Konservu dokumenton" msgstr "Konservu dokumenton"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Konservu dokumenton (deviga anstataŭo)" msgstr "Konservu dokumenton (deviga anstataŭo)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Konservu kunsendaĵojn" msgstr "Konservu kunsendaĵojn"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Agordu paĝdelokado" msgstr "Agordu paĝdelokado"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "" msgstr ""
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "" msgstr ""
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr ""
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr ""
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Fiaskis iro de xdg-open" msgstr "Fiaskis iro de xdg-open"
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "" msgstr ""
@ -381,27 +413,27 @@ msgstr "Montru dosiera informacio"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "Ŝargado ..." msgstr "Ŝargado ..."
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Selektita teksto estas kopiita en la poŝo: %s" msgstr "Selektita teksto estas kopiita en la poŝo: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Kopiu bildon" msgstr "Kopiu bildon"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "Savi bildojn kiel" msgstr "Savi bildojn kiel"
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Ĉi-tiu dokumento enhavas neniam indekson." msgstr "Ĉi-tiu dokumento enhavas neniam indekson."
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Neniu nomo]" msgstr "[Neniu nomo]"

224
po/es.po
View file

@ -5,8 +5,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-04-03 15:25+0000\n" "PO-Revision-Date: 2012-04-03 15:25+0000\n"
"Last-Translator: Moritz Lipp <mlq@pwmt.org>\n" "Last-Translator: Moritz Lipp <mlq@pwmt.org>\n"
"Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/" "Language-Team: Spanish (Castilian) (http://www.transifex.net/projects/p/"
@ -17,23 +17,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Entrada inválida: '%s'." msgstr "Entrada inválida: '%s'."
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Índice invalido: '%s'." msgstr "Índice invalido: '%s'."
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Ningún documento abierto." msgstr "Ningún documento abierto."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Número de argumentos inválido." msgstr "Número de argumentos inválido."
@ -91,44 +92,44 @@ msgstr "Error al guardar el documento."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Número de argumentos inválido." msgstr "Número de argumentos inválido."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'." msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'."
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Escrito fichero adjunto '%s' a '%s'." msgstr "Escrito fichero adjunto '%s' a '%s'."
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "Escrito fichero adjunto '%s' a '%s'." msgstr "Escrito fichero adjunto '%s' a '%s'."
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'." msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'."
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "" msgstr "Imagen desconocida '%s'."
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr "Adjunto o imagen desconocidos '%s'."
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "El argumento ha de ser un número." msgstr "El argumento ha de ser un número."
#: ../completion.c:250 #: ../completion.c:250
#, c-format #, c-format
msgid "Page %d" msgid "Page %d"
msgstr "" msgstr "Página %d"
#: ../completion.c:293 #: ../completion.c:293
msgid "Attachments" msgid "Attachments"
@ -137,215 +138,246 @@ msgstr "Guardar ficheros adjuntos"
#. add images #. add images
#: ../completion.c:324 #: ../completion.c:324
msgid "Images" msgid "Images"
msgstr "" msgstr "Imágenes"
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Base de datos" msgstr "Base de datos"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Unidad de zoom" msgstr "Unidad de zoom"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Separación entre páginas" msgstr "Separación entre páginas"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Número de páginas por fila" msgstr "Número de páginas por fila"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr "Columna de la primera página"
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Unidad de desplazamiento" msgstr "Paso de desplazamiento"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr "Paso de desplazamiento horizontal"
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr "Solapamiento del desplazamiento de página"
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Zoom mínimo" msgstr "Zoom mínimo"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Zoom máximo" msgstr "Zoom máximo"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "" msgstr "Tiempo de vida (en segundos) de una página oculta"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "" msgstr "Cantidad de segundos entre limpieza de caché"
"Cantidad de segundos entre las comprobaciones de las páginas invisibles"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr "Número de posiciones a recordar en la lista de saltos"
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Recoloreado (color oscuro)" msgstr "Recoloreado (color oscuro)"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Recoloreado (color claro)" msgstr "Recoloreado (color claro)"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Color para destacar" msgstr "Color para destacar"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Color para destacar (activo)" msgstr "Color para destacar (activo)"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Recolorear páginas" msgstr "Recolorear páginas"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
"Cuando se recoloree, mantener el tono original y ajustar únicamente la "
"luminosidad"
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Navegación/Scroll cíclica/o" msgstr "Navegación/Scroll cíclica/o"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "" msgstr ""
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "" msgstr "Zoom centrado horizontalmente"
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "" msgstr "Centrar el resultado horizontalmente"
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Transparencia para el destacado" msgstr "Transparencia para el destacado"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Renderizado 'Cargando ...'" msgstr "Renderizado 'Cargando ...'"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Ajustarse al abrir un fichero" msgstr "Ajustarse al abrir un fichero"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Mostrar directorios y ficheros ocultos" msgstr "Mostrar directorios y ficheros ocultos"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Mostrar directorios" msgstr "Mostrar directorios"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Abrir siempre la primera página" msgstr "Abrir siempre la primera página"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr "Destacar los resultados de búsqueda"
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr "Habilitar la búsqueda incremental"
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr "Borrar resultados de búsqueda al abortar"
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr "Usar el nombre del archivo en el título de la ventana"
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr "Habilitar soporte synctex"
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Añadir Favorito" msgstr "Añadir Favorito"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Eliminar Favorito" msgstr "Eliminar Favorito"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Listar favoritos" msgstr "Listar favoritos"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Cerrar fichero actual" msgstr "Cerrar fichero actual"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Mostrar información del fichero" msgstr "Mostrar información del fichero"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr "Ejecutar un comando"
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Mostrar ayuda" msgstr "Mostrar ayuda"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Abrir documento" msgstr "Abrir documento"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Salir de zathura" msgstr "Salir de zathura"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Imprimir documento" msgstr "Imprimir documento"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Guardar documento" msgstr "Guardar documento"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Guardar documento (y sobreescribir)" msgstr "Guardar documento (y sobreescribir)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Guardar ficheros adjuntos" msgstr "Guardar ficheros adjuntos"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Asignar el desplazamiento de página" msgstr "Asignar el desplazamiento de página"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "" msgstr "Marcar la posición actual en el documento"
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "" msgstr "Borrar las marcas especificadas"
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr "No destacar los resultados de la búsqueda actual"
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr "Destacar los resultados de la búsqueda actual"
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr "Mostrar versión"
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Error al tratar de ejecutar xdg-open" msgstr "Error al tratar de ejecutar xdg-open"
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "Reasignar a la ventana especificada por xid" msgstr "Reasignar a la ventana especificada por xid"
@ -368,7 +400,7 @@ msgstr "Fork, ejecutándose en background"
#: ../main.c:57 #: ../main.c:57
msgid "Document password" msgid "Document password"
msgstr "" msgstr "Contraseña del documento"
#: ../main.c:58 #: ../main.c:58
msgid "Log level (debug, info, warning, error)" msgid "Log level (debug, info, warning, error)"
@ -380,29 +412,29 @@ msgstr "Mostrar información del fichero"
#: ../main.c:61 #: ../main.c:61
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr "Editor de Synctex (reenvíado al commando synctex)"
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "Cargando ..." msgstr "Cargando ..."
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Se ha copiado el texto seleccionado al portapapeles: %s" msgstr "Se ha copiado el texto seleccionado al portapapeles: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Copiar imagen" msgstr "Copiar imagen"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "" msgstr "Salvar imagen como"
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Este documento no contiene ningún índice" msgstr "Este documento no contiene ningún índice"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Sin nombre]" msgstr "[Sin nombre]"

View file

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-04-03 15:26+0000\n" "PO-Revision-Date: 2012-04-03 15:26+0000\n"
"Last-Translator: watsh1ken <wat.sh1ken@gmail.com>\n" "Last-Translator: watsh1ken <wat.sh1ken@gmail.com>\n"
"Language-Team: Spanish (Chile) (http://www.transifex.net/projects/p/zathura/" "Language-Team: Spanish (Chile) (http://www.transifex.net/projects/p/zathura/"
@ -18,23 +18,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Entrada inválida: '%s'." msgstr "Entrada inválida: '%s'."
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Índice invalido: '%s'." msgstr "Índice invalido: '%s'."
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Ningún documento abierto." msgstr "Ningún documento abierto."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Número de argumentos inválido." msgstr "Número de argumentos inválido."
@ -92,37 +93,37 @@ msgstr "Error al guardar el documento."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Número de argumentos inválido." msgstr "Número de argumentos inválido."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'." msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'."
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Fichero adjunto escrito '%s' a '%s'." msgstr "Fichero adjunto escrito '%s' a '%s'."
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "Fichero adjunto escrito '%s' a '%s'." msgstr "Fichero adjunto escrito '%s' a '%s'."
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'." msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'."
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "" msgstr ""
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr ""
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "El argumento debe ser un número." msgstr "El argumento debe ser un número."
@ -141,212 +142,242 @@ msgid "Images"
msgstr "" msgstr ""
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Fin de la base de datos." msgstr "Fin de la base de datos."
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Unidad de zoom" msgstr "Unidad de zoom"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Separación entre páginas" msgstr "Separación entre páginas"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Numero de páginas por fila" msgstr "Numero de páginas por fila"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Unidad de desplazamiento" msgstr "Unidad de desplazamiento"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Zoom mínimo" msgstr "Zoom mínimo"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Zoom máximo" msgstr "Zoom máximo"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "" msgstr ""
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "" msgstr ""
"Cantidad de segundos entre las comprobaciones de las páginas invisibles" "Cantidad de segundos entre las comprobaciones de las páginas invisibles"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Recolorando (color oscuro)" msgstr "Recolorando (color oscuro)"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Recolorando (color claro)" msgstr "Recolorando (color claro)"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Color para destacar" msgstr "Color para destacar"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Color para destacar (activo)" msgstr "Color para destacar (activo)"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Recolorar páginas" msgstr "Recolorar páginas"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Scroll cíclico" msgstr "Scroll cíclico"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "" msgstr ""
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "" msgstr ""
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "" msgstr ""
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Transparencia para lo destacado" msgstr "Transparencia para lo destacado"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Renderizando 'Cargando...'" msgstr "Renderizando 'Cargando...'"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Ajustar al abrirse un archivo" msgstr "Ajustar al abrirse un archivo"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Mostrar archivos ocultos y directorios" msgstr "Mostrar archivos ocultos y directorios"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Mostrar directorios" msgstr "Mostrar directorios"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Siempre abrir en primera página" msgstr "Siempre abrir en primera página"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr ""
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr ""
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Agregar un marcador" msgstr "Agregar un marcador"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Eliminar un marcador" msgstr "Eliminar un marcador"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Listar todos los marcadores" msgstr "Listar todos los marcadores"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Cerrar archivo actual" msgstr "Cerrar archivo actual"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Mostrar información del archivo" msgstr "Mostrar información del archivo"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Mostrar ayuda" msgstr "Mostrar ayuda"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Abrir documento" msgstr "Abrir documento"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Cerrar zathura" msgstr "Cerrar zathura"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Imprimir documento" msgstr "Imprimir documento"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Guardar documento" msgstr "Guardar documento"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Guardar documento (y forzar sobreescritura)" msgstr "Guardar documento (y forzar sobreescritura)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Guardar archivos adjuntos" msgstr "Guardar archivos adjuntos"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Asignar desplazamiento de la página" msgstr "Asignar desplazamiento de la página"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "" msgstr ""
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "" msgstr ""
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr ""
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr ""
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Error al ejecutar xdg-open." msgstr "Error al ejecutar xdg-open."
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "Reasignar a la ventana especificada por xid" msgstr "Reasignar a la ventana especificada por xid"
@ -383,27 +414,27 @@ msgstr "Mostrar información del archivo"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "Cargando..." msgstr "Cargando..."
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Texto seleccionado copiado al portapapeles: %s" msgstr "Texto seleccionado copiado al portapapeles: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Copiar imagen" msgstr "Copiar imagen"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "" msgstr ""
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Este document no contiene índice" msgstr "Este document no contiene índice"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Sin nombre]" msgstr "[Sin nombre]"

263
po/et.po
View file

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-04-03 15:25+0000\n" "PO-Revision-Date: 2012-04-03 15:25+0000\n"
"Last-Translator: Rivo Zängov <eraser@eraser.ee>\n" "Last-Translator: Rivo Zängov <eraser@eraser.ee>\n"
"Language-Team: Estonian (http://www.transifex.net/projects/p/zathura/" "Language-Team: Estonian (http://www.transifex.net/projects/p/zathura/"
@ -18,23 +18,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "" msgstr ""
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "" msgstr ""
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "" msgstr ""
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "" msgstr ""
@ -92,37 +93,37 @@ msgstr ""
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "" msgstr ""
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "" msgstr ""
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr ""
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "" msgstr ""
@ -141,211 +142,241 @@ msgid "Images"
msgstr "" msgstr ""
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "" msgstr ""
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "" msgstr ""
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "" msgstr ""
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "" msgstr ""
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "" msgstr ""
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Zoom minimum" msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:121
msgid "Zoom maximum"
msgstr ""
#: ../config.c:123
msgid "Life time (in seconds) of a hidden page"
msgstr ""
#: ../config.c:124
msgid "Amount of seconds between each cache purge"
msgstr ""
#: ../config.c:126
msgid "Recoloring (dark color)"
msgstr ""
#: ../config.c:128
msgid "Recoloring (light color)"
msgstr ""
#: ../config.c:130
msgid "Color for highlighting"
msgstr "Esiletõstmise värv"
#: ../config.c:132
msgid "Color for highlighting (active)"
msgstr "Esiletõstmise värv (aktiivne)"
#: ../config.c:136
msgid "Recolor pages"
msgstr ""
#: ../config.c:138
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../config.c:140
msgid "Wrap scrolling"
msgstr ""
#: ../config.c:142
msgid "Advance number of pages per row"
msgstr ""
#: ../config.c:144
msgid "Horizontally centered zoom"
msgstr ""
#: ../config.c:146
msgid "Center result horizontally"
msgstr ""
#: ../config.c:148
msgid "Transparency for highlighting"
msgstr ""
#: ../config.c:150
msgid "Render 'Loading ...'"
msgstr "" msgstr ""
#: ../config.c:151 #: ../config.c:151
msgid "Adjust to when opening file" msgid "Zoom minimum"
msgstr "" msgstr ""
#: ../config.c:153 #: ../config.c:153
msgid "Show hidden files and directories" msgid "Zoom maximum"
msgstr "" msgstr ""
#: ../config.c:155 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page"
msgstr ""
#: ../config.c:156
msgid "Amount of seconds between each cache purge"
msgstr ""
#: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)"
msgstr ""
#: ../config.c:162
msgid "Recoloring (light color)"
msgstr ""
#: ../config.c:164
msgid "Color for highlighting"
msgstr "Esiletõstmise värv"
#: ../config.c:166
msgid "Color for highlighting (active)"
msgstr "Esiletõstmise värv (aktiivne)"
#: ../config.c:170
msgid "Recolor pages"
msgstr ""
#: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../config.c:174
msgid "Wrap scrolling"
msgstr ""
#: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row"
msgstr ""
#: ../config.c:180
msgid "Horizontally centered zoom"
msgstr ""
#: ../config.c:182
msgid "Center result horizontally"
msgstr ""
#: ../config.c:184
msgid "Transparency for highlighting"
msgstr ""
#: ../config.c:186
msgid "Render 'Loading ...'"
msgstr ""
#: ../config.c:187
msgid "Adjust to when opening file"
msgstr ""
#: ../config.c:189
msgid "Show hidden files and directories"
msgstr ""
#: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Näita kaustasid" msgstr "Näita kaustasid"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Ava alati esimene leht" msgstr "Ava alati esimene leht"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr ""
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr ""
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Lisa järjehoidja" msgstr "Lisa järjehoidja"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Kustuta järjehoidja" msgstr "Kustuta järjehoidja"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Näita kõiki järjehoidjaid" msgstr "Näita kõiki järjehoidjaid"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Sulge praegune fail" msgstr "Sulge praegune fail"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Näita faili infot" msgstr "Näita faili infot"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Näita abiinfot" msgstr "Näita abiinfot"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Ava dokument" msgstr "Ava dokument"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Sule zathura" msgstr "Sule zathura"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Prindi dokument" msgstr "Prindi dokument"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Salvesta dokument" msgstr "Salvesta dokument"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "" msgstr ""
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Salvesta manused" msgstr "Salvesta manused"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "" msgstr ""
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "" msgstr ""
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "" msgstr ""
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr ""
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr ""
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "" msgstr ""
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "" msgstr ""
@ -382,27 +413,27 @@ msgstr "Näita faili infot"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "" msgstr ""
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "" msgstr ""
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Kopeeri pilt" msgstr "Kopeeri pilt"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "" msgstr ""
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "" msgstr ""
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Nime pole]" msgstr "[Nime pole]"

251
po/fr.po
View file

@ -4,37 +4,40 @@
# Translators: # Translators:
# Quentin Stiévenart <quentin.stievenart@gmail.com>, 2012. # Quentin Stiévenart <quentin.stievenart@gmail.com>, 2012.
# Stéphane Aulery <lkppo@free.fr>, 2012. # Stéphane Aulery <lkppo@free.fr>, 2012.
# Benoît Knecht <benoit.knecht@gmail.com>, 2012.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: http://bt.pwmt.org/\n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-05 15:45+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-08-07 22:54+0000\n" "PO-Revision-Date: 2012-12-14 00:08+0100\n"
"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n" "Last-Translator: Benoît Knecht <benoit.knecht@gmail.com>\n"
"Language-Team: French (http://www.transifex.com/projects/p/zathura/language/fr/)\n" "Language-Team: French (http://www.transifex.com/projects/p/zathura/language/"
"fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1)\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Entrée invalide : '%s'" msgstr "Entrée invalide : '%s'"
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Index invalide : '%s'" msgstr "Index invalide : '%s'"
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Aucun document ouvert." msgstr "Aucun document ouvert."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Nombre d'arguments invalide." msgstr "Nombre d'arguments invalide."
@ -46,7 +49,7 @@ msgstr "Marque page mis à jour avec succès : %s"
#: ../commands.c:55 #: ../commands.c:55
#, c-format #, c-format
msgid "Could not create bookmark: %s" msgid "Could not create bookmark: %s"
msgstr "Impossible de créer le marque page: %s" msgstr "Impossible de créer le marque-page : %s"
#: ../commands.c:59 #: ../commands.c:59
#, c-format #, c-format
@ -61,12 +64,12 @@ msgstr "Marque page supprimé : %s"
#: ../commands.c:84 #: ../commands.c:84
#, c-format #, c-format
msgid "Failed to remove bookmark: %s" msgid "Failed to remove bookmark: %s"
msgstr "Échec lors de la suppression du marque page : %s" msgstr "Échec lors de la suppression du marque-page : %s"
#: ../commands.c:110 #: ../commands.c:110
#, c-format #, c-format
msgid "No such bookmark: %s" msgid "No such bookmark: %s"
msgstr "Aucun marque page : %s" msgstr "Aucun marque-page correspondant : %s"
#: ../commands.c:161 ../commands.c:183 #: ../commands.c:161 ../commands.c:183
msgid "No information available." msgid "No information available."
@ -92,37 +95,37 @@ msgstr "Échec lors de l'enregistrement du document."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Nombre d'arguments invalide." msgstr "Nombre d'arguments invalide."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Impossible d'écrire la pièce jointe '%s' dans '%s'." msgstr "Impossible d'écrire la pièce jointe '%s' dans '%s'."
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Ecriture de la pièce jointe '%s' dans '%s'." msgstr "Pièce jointe '%s' écrite dans '%s'."
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "Écriture de l'image '%s' dans '%s'." msgstr "Image '%s' écrite dans '%s'."
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "Impossible d'écrire l'image '%s' dans '%s'." msgstr "Impossible d'écrire l'image '%s' dans '%s'."
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "Image '%s' inconnue" msgstr "Image '%s' inconnue."
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "Pièce jointe ou image '%s' inconnue." msgstr "Pièce jointe ou image '%s' inconnue."
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "L'argument doit être un nombre." msgstr "L'argument doit être un nombre."
@ -141,212 +144,242 @@ msgid "Images"
msgstr "Images" msgstr "Images"
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Gestionnaire de base de données" msgstr "Gestionnaire de base de données"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Facteur de zoom" msgstr "Incrément de zoom"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Espacement entre les pages" msgstr "Espacement entre les pages"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Nombre de page par rangée" msgstr "Nombre de page par rangée"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "Colonne de la première page" msgstr "Colonne de la première page"
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Facteur de défilement" msgstr "Incrément de défilement"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "Pas de défilement horizontal" msgstr "Incrément de défilement horizontal"
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr "Recouvrement lors du défilement par page entière"
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Zoom minimum" msgstr "Zoom minimum"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Zoom maximum" msgstr "Zoom maximum"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "Durée de vie (en secondes) d'une page cachée" msgstr "Durée de vie (en secondes) d'une page cachée"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "Délai en secondes entre chaque purge du cache." msgstr "Délai en secondes entre chaque purge du cache"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr "Nombre de positions à mémoriser dans la liste de sauts"
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Recolorisation (couleurs sombres)" msgstr "Recoloration (couleur sombre)"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Recolorisation (couleurs claires)" msgstr "Recoloration (couleur claire)"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Couleur de surbrillance" msgstr "Couleur de surbrillance"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Couleur de surbrillance (active)" msgstr "Couleur de surbrillance (active)"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Recoloriser les pages" msgstr "Recoloriser les pages"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
"Lors du recalibrage des couleurs garder la teinte d'origine et ajuster " "Lors de la recoloration garder la teinte d'origine et ajuster seulement la "
"seulement la luminosité" "luminosité"
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Défiler lors du renvoi à la ligne" msgstr "Défiler en boucle"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr "Défilement tenant compte des limites de page"
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "Augmenter le nombre de pages par rangée" msgstr "Augmenter le nombre de pages par rangée"
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "Zoom centré horizontalement" msgstr "Zoom centré horizontalement"
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "Centrer le résultat horizontalement" msgstr "Centrer le résultat horizontalement"
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Transparence de la surbrillance" msgstr "Transparence de la surbrillance"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Rendu 'Chargement...'" msgstr "Afficher 'Chargement...'"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Ajuster à l'ouverture du fichier" msgstr "Ajuster à l'ouverture du fichier"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Montrer les fichiers et dossiers cachés" msgstr "Montrer les fichiers et dossiers cachés"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Montrer les dossiers" msgstr "Montrer les dossiers"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Toujours ouvrir à la première page" msgstr "Toujours ouvrir à la première page"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "Surligner les résultats de la recherche" msgstr "Surligner les résultats de la recherche"
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr "Activer la recherche incrémentale"
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "Effacer les résultats de recherche en cas d'abandon" msgstr "Effacer les résultats de recherche en cas d'annulation"
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "Utiliser le nom de base dans le titre de la fenêtre" msgstr "Utiliser le nom de base du fichier dans le titre de la fenêtre"
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr "Activer la prise en charge de synctex"
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Ajouter un marque-page" msgstr "Ajouter un marque-page"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Supprimer un marque-page" msgstr "Supprimer un marque-page"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Lister tous les marque-pages" msgstr "Lister tous les marque-pages"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Fermer le fichier actuel" msgstr "Fermer le fichier actuel"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Montrer les informations sur le fichier" msgstr "Montrer les informations sur le fichier"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr "Exécuter une commande"
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Afficher l'aide" msgstr "Afficher l'aide"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Ouvrir un document" msgstr "Ouvrir un document"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Quitter Zathura" msgstr "Quitter zathura"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Imprimer un document" msgstr "Imprimer le document"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Sauver un document" msgstr "Sauver le document"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Sauver un document (et forcer l'écrasement)" msgstr "Sauver le document (et forcer l'écrasement)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Enregistrer les pièces jointes" msgstr "Enregistrer les pièces jointes"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Régler le décalage de page" msgstr "Définir le décalage de page"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "Marquer l'emplacement actuel dans le document" msgstr "Marquer l'emplacement actuel dans le document"
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "Supprimer les marques indiquées" msgstr "Supprimer les marques indiquées"
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "Ne pas surligner les résultats de la recherche actuelle" msgstr "Ne pas surligner les résultats de la recherche en cours"
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "Surligner les résultats de la recherche actuelle" msgstr "Surligner les résultats de la recherche en cours"
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "Afficher les informations de version " msgstr "Afficher les informations de version"
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Échec lors du lancement de xdg-open" msgstr "Échec lors du lancement de xdg-open."
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr "Lien : page %d"
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr "Lien : %s"
#: ../links.c:190
msgid "Link: Invalid"
msgstr "Lien : Invalide"
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
@ -366,7 +399,7 @@ msgstr "Chemin vers le dossier de plugins"
#: ../main.c:56 #: ../main.c:56
msgid "Fork into the background" msgid "Fork into the background"
msgstr "Forker en arrière-plan" msgstr "Détacher en arrière-plan"
#: ../main.c:57 #: ../main.c:57
msgid "Document password" msgid "Document password"
@ -374,37 +407,37 @@ msgstr "Mot de passe du document"
#: ../main.c:58 #: ../main.c:58
msgid "Log level (debug, info, warning, error)" msgid "Log level (debug, info, warning, error)"
msgstr "Niveau d'affichage (debug, info, warning, error)" msgstr "Niveau de journalisation (debug, info, warning, error)"
#: ../main.c:59 #: ../main.c:59
msgid "Print version information" msgid "Print version information"
msgstr "Afficher les informations de version " msgstr "Afficher les informations de version"
#: ../main.c:61 #: ../main.c:61
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "Éditeur Synctex (transférer à la commande synctex)" msgstr "Éditeur synctex (transféré à la commande synctex)"
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "Chargement..." msgstr "Chargement..."
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Copie du texte sélectionné dans le presse-papiers : %s" msgstr "Texte sélectionné copié dans le presse-papiers : %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Copier l'image" msgstr "Copier l'image"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "Enregistrer l'image sous" msgstr "Enregistrer l'image sous"
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Ce document ne contient pas d'index" msgstr "Ce document ne contient pas d'index"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Sans nom]" msgstr "[Sans nom]"

263
po/it.po
View file

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-06-20 14:58+0000\n" "PO-Revision-Date: 2012-06-20 14:58+0000\n"
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n" "Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
"Language-Team: Italian (http://www.transifex.com/projects/p/zathura/language/" "Language-Team: Italian (http://www.transifex.com/projects/p/zathura/language/"
@ -18,23 +18,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Input inserito '%s' non valido." msgstr "Input inserito '%s' non valido."
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Indice inserito '%s' non valido." msgstr "Indice inserito '%s' non valido."
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Nessun documento aperto." msgstr "Nessun documento aperto."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Numero di argomenti errato." msgstr "Numero di argomenti errato."
@ -92,37 +93,37 @@ msgstr "Impossibile salvare il documento."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Numero di argomenti non valido." msgstr "Numero di argomenti non valido."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Impossibile salvare l' allegato '%s' in '%s'" msgstr "Impossibile salvare l' allegato '%s' in '%s'"
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Allegato '%s' salvato in '%s'" msgstr "Allegato '%s' salvato in '%s'"
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "" msgstr ""
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr ""
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "L' argomento dev' essere un numero." msgstr "L' argomento dev' essere un numero."
@ -141,211 +142,241 @@ msgid "Images"
msgstr "" msgstr ""
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Backend del database" msgstr "Backend del database"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "" msgstr ""
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Spaziatura tra le pagine" msgstr "Spaziatura tra le pagine"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Numero di pagine per riga" msgstr "Numero di pagine per riga"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "" msgstr ""
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Zoom minimum" msgid "Full page scroll overlap"
msgstr "Zoom minimo"
#: ../config.c:121
msgid "Zoom maximum"
msgstr "Zoom massimo"
#: ../config.c:123
msgid "Life time (in seconds) of a hidden page"
msgstr "Durata (in secondi) di una pagina nascosta"
#: ../config.c:124
msgid "Amount of seconds between each cache purge"
msgstr "Tempo in secondi tra le invalidazioni della cache"
#: ../config.c:126
msgid "Recoloring (dark color)"
msgstr ""
#: ../config.c:128
msgid "Recoloring (light color)"
msgstr ""
#: ../config.c:130
msgid "Color for highlighting"
msgstr ""
#: ../config.c:132
msgid "Color for highlighting (active)"
msgstr ""
#: ../config.c:136
msgid "Recolor pages"
msgstr "Ricolora le pagine"
#: ../config.c:138
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../config.c:140
msgid "Wrap scrolling"
msgstr "Scrolling continuo"
#: ../config.c:142
msgid "Advance number of pages per row"
msgstr ""
#: ../config.c:144
msgid "Horizontally centered zoom"
msgstr ""
#: ../config.c:146
msgid "Center result horizontally"
msgstr ""
#: ../config.c:148
msgid "Transparency for highlighting"
msgstr ""
#: ../config.c:150
msgid "Render 'Loading ...'"
msgstr "" msgstr ""
#: ../config.c:151 #: ../config.c:151
msgid "Zoom minimum"
msgstr "Zoom minimo"
#: ../config.c:153
msgid "Zoom maximum"
msgstr "Zoom massimo"
#: ../config.c:155
msgid "Life time (in seconds) of a hidden page"
msgstr "Durata (in secondi) di una pagina nascosta"
#: ../config.c:156
msgid "Amount of seconds between each cache purge"
msgstr "Tempo in secondi tra le invalidazioni della cache"
#: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)"
msgstr ""
#: ../config.c:162
msgid "Recoloring (light color)"
msgstr ""
#: ../config.c:164
msgid "Color for highlighting"
msgstr ""
#: ../config.c:166
msgid "Color for highlighting (active)"
msgstr ""
#: ../config.c:170
msgid "Recolor pages"
msgstr "Ricolora le pagine"
#: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../config.c:174
msgid "Wrap scrolling"
msgstr "Scrolling continuo"
#: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row"
msgstr ""
#: ../config.c:180
msgid "Horizontally centered zoom"
msgstr ""
#: ../config.c:182
msgid "Center result horizontally"
msgstr ""
#: ../config.c:184
msgid "Transparency for highlighting"
msgstr ""
#: ../config.c:186
msgid "Render 'Loading ...'"
msgstr ""
#: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "" msgstr ""
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Mostra file e cartelle nascosti" msgstr "Mostra file e cartelle nascosti"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Mostra cartelle" msgstr "Mostra cartelle"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Apri sempre alla prima pagina" msgstr "Apri sempre alla prima pagina"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr ""
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr ""
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Aggiungi un segnalibro" msgstr "Aggiungi un segnalibro"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Elimina un segnalibro" msgstr "Elimina un segnalibro"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Mostra i segnalibri" msgstr "Mostra i segnalibri"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Chiudi il file corrente" msgstr "Chiudi il file corrente"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Mostra le informazioni sul file" msgstr "Mostra le informazioni sul file"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Mostra l' aiuto" msgstr "Mostra l' aiuto"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Apri un documento" msgstr "Apri un documento"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Chiudi zathura" msgstr "Chiudi zathura"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Stampa il documento" msgstr "Stampa il documento"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Salva il documento" msgstr "Salva il documento"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Salva il documento (e sovrascrivi)" msgstr "Salva il documento (e sovrascrivi)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Salva allegati" msgstr "Salva allegati"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Imposta l' offset della pagina" msgstr "Imposta l' offset della pagina"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "" msgstr ""
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "" msgstr ""
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr ""
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr ""
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Impossibile eseguire xdg-open." msgstr "Impossibile eseguire xdg-open."
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "" msgstr ""
@ -382,27 +413,27 @@ msgstr "Mostra le informazioni sul file"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "" msgstr ""
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "La selezione è stato copiata negli appunti:%s" msgstr "La selezione è stato copiata negli appunti:%s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Copia immagine" msgstr "Copia immagine"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "" msgstr ""
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Questo documento non contiene l' indice" msgstr "Questo documento non contiene l' indice"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Nessun nome]" msgstr "[Nessun nome]"

173
po/pl.po
View file

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-04-03 16:07+0000\n" "PO-Revision-Date: 2012-04-03 16:07+0000\n"
"Last-Translator: p <poczciwiec@gmail.com>\n" "Last-Translator: p <poczciwiec@gmail.com>\n"
"Language-Team: Polish (http://www.transifex.net/projects/p/zathura/language/" "Language-Team: Polish (http://www.transifex.net/projects/p/zathura/language/"
@ -19,23 +19,24 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2)\n" "|| n%100>=20) ? 1 : 2)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Nieprawidłowy argument: %s" msgstr "Nieprawidłowy argument: %s"
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Nieprawidłowy indeks: %s" msgstr "Nieprawidłowy indeks: %s"
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Nie otwarto żadnego pliku" msgstr "Nie otwarto żadnego pliku"
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Nieprawidłowa liczba parametrów polecenia" msgstr "Nieprawidłowa liczba parametrów polecenia"
@ -93,37 +94,37 @@ msgstr "Błąd zapisu"
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Niewłaściwa liczba parametrów polecenia" msgstr "Niewłaściwa liczba parametrów polecenia"
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Nie można dodać załącznika %s do pliku %s" msgstr "Nie można dodać załącznika %s do pliku %s"
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Zapisano załącznik %s do pliku %s" msgstr "Zapisano załącznik %s do pliku %s"
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "Zapisano obrazek %s do pliku %s" msgstr "Zapisano obrazek %s do pliku %s"
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "Nie można dodać obrazka %s do pliku %s" msgstr "Nie można dodać obrazka %s do pliku %s"
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "Nieznany obrazek '%s'." msgstr "Nieznany obrazek '%s'."
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "Nieznany załącznik lub obrazek '%s'." msgstr "Nieznany załącznik lub obrazek '%s'."
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "Parametr polecenia musi być liczbą" msgstr "Parametr polecenia musi być liczbą"
@ -142,211 +143,241 @@ msgid "Images"
msgstr "Obrazki" msgstr "Obrazki"
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Baza danych" msgstr "Baza danych"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Skok powiększenia" msgstr "Skok powiększenia"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Odstęp pomiędzy stronami" msgstr "Odstęp pomiędzy stronami"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Liczba stron w wierszu" msgstr "Liczba stron w wierszu"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Skok przewijania" msgstr "Skok przewijania"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Minimalne powiększenie" msgstr "Minimalne powiększenie"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Maksymalne powiększenie" msgstr "Maksymalne powiększenie"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "Czas życia niewidocznej strony (w sekundach)" msgstr "Czas życia niewidocznej strony (w sekundach)"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "Okres sprawdzania widoczności stron (w sekundach)" msgstr "Okres sprawdzania widoczności stron (w sekundach)"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Ciemny kolor negatywu" msgstr "Ciemny kolor negatywu"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Jasny kolor negatywu" msgstr "Jasny kolor negatywu"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Kolor wyróżnienia" msgstr "Kolor wyróżnienia"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Kolor wyróżnienia bieżącego elementu" msgstr "Kolor wyróżnienia bieżącego elementu"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Negatyw" msgstr "Negatyw"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Zawijanie dokumentu" msgstr "Zawijanie dokumentu"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "Liczba stron w wierszu" msgstr "Liczba stron w wierszu"
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "" msgstr ""
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "" msgstr ""
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Przezroczystość wyróżnienia" msgstr "Przezroczystość wyróżnienia"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Wyświetlaj: „Wczytywanie pliku...”" msgstr "Wyświetlaj: „Wczytywanie pliku...”"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Dopasowanie widoku pliku" msgstr "Dopasowanie widoku pliku"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Wyświetl ukryte pliki i katalogi" msgstr "Wyświetl ukryte pliki i katalogi"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Wyświetl katalogi" msgstr "Wyświetl katalogi"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Zawsze otwieraj na pierwszej stronie" msgstr "Zawsze otwieraj na pierwszej stronie"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "Podświetl wyniki wyszukiwania" msgstr "Podświetl wyniki wyszukiwania"
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "Wyczyść wyniki wyszukiwania po przerwaniu" msgstr "Wyczyść wyniki wyszukiwania po przerwaniu"
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Dodaj zakładkę" msgstr "Dodaj zakładkę"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Usuń zakładkę" msgstr "Usuń zakładkę"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Wyświetl zakładki" msgstr "Wyświetl zakładki"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Zamknij plik" msgstr "Zamknij plik"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Wyświetl informacje o pliku" msgstr "Wyświetl informacje o pliku"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Wyświetl pomoc" msgstr "Wyświetl pomoc"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Otwórz plik" msgstr "Otwórz plik"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Zakończ" msgstr "Zakończ"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Wydrukuj" msgstr "Wydrukuj"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Zapisz" msgstr "Zapisz"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Zapisz (nadpisując istniejący plik)" msgstr "Zapisz (nadpisując istniejący plik)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Zapisz załączniki" msgstr "Zapisz załączniki"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Ustaw przesunięcie numerów stron" msgstr "Ustaw przesunięcie numerów stron"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "Zaznacz aktualną pozycję w dokumencie" msgstr "Zaznacz aktualną pozycję w dokumencie"
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "Skasuj określone zakładki" msgstr "Skasuj określone zakładki"
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "Nie podświetlaj aktualnych wyników wyszukiwania " msgstr "Nie podświetlaj aktualnych wyników wyszukiwania "
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "Podświetl aktualne wyniki wyszukiwania" msgstr "Podświetl aktualne wyniki wyszukiwania"
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "Wyświetl informacje o wersji" msgstr "Wyświetl informacje o wersji"
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Wystąpił problem z uruchomieniem xdg-open" msgstr "Wystąpił problem z uruchomieniem xdg-open"
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "Przypisz proces do rodzica o danym xid" msgstr "Przypisz proces do rodzica o danym xid"
@ -383,27 +414,27 @@ msgstr "Wyświetl informacje o wersji"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "Wczytywanie pliku..." msgstr "Wczytywanie pliku..."
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Zaznaczony tekst skopiowano do schowka: %s" msgstr "Zaznaczony tekst skopiowano do schowka: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Skopiuj obrazek" msgstr "Skopiuj obrazek"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "Zapisz obrazek jako" msgstr "Zapisz obrazek jako"
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Dokument nie zawiera indeksu" msgstr "Dokument nie zawiera indeksu"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[bez nazwy]" msgstr "[bez nazwy]"

173
po/ru.po
View file

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-06-20 14:58+0000\n" "PO-Revision-Date: 2012-06-20 14:58+0000\n"
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n" "Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
"Language-Team: Russian (http://www.transifex.com/projects/p/zathura/language/" "Language-Team: Russian (http://www.transifex.com/projects/p/zathura/language/"
@ -19,23 +19,24 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && 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" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Неправильный ввод: %s" msgstr "Неправильный ввод: %s"
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Получен неверный индекс %s" msgstr "Получен неверный индекс %s"
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Документ не открыт" msgstr "Документ не открыт"
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Неверное число аргументов" msgstr "Неверное число аргументов"
@ -93,37 +94,37 @@ msgstr "Не удалось сохранить документ"
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Неверное количество аргументов" msgstr "Неверное количество аргументов"
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Не могу сохранить приложенный файл %s в %s" msgstr "Не могу сохранить приложенный файл %s в %s"
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Файл %s сохранён в %s" msgstr "Файл %s сохранён в %s"
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "" msgstr ""
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr ""
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "Аргумент должен быть числом" msgstr "Аргумент должен быть числом"
@ -142,211 +143,241 @@ msgid "Images"
msgstr "" msgstr ""
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Бэкэнд базы данных" msgstr "Бэкэнд базы данных"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Шаг увеличения" msgstr "Шаг увеличения"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Разрыв между страницами" msgstr "Разрыв между страницами"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Количество страниц в ряд" msgstr "Количество страниц в ряд"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Шаг прокрутки" msgstr "Шаг прокрутки"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Минимальное увеличение" msgstr "Минимальное увеличение"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Максимальное увеличение" msgstr "Максимальное увеличение"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "Время жизни (секунды) скрытой страницы" msgstr "Время жизни (секунды) скрытой страницы"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "Время (в секундах) между очисткой кэшей" msgstr "Время (в секундах) между очисткой кэшей"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Перекрашивание (тёмные тона)" msgstr "Перекрашивание (тёмные тона)"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Перекрашивание (светлые тона)" msgstr "Перекрашивание (светлые тона)"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Цвет для подсветки" msgstr "Цвет для подсветки"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Цвет для подсветки (активной)" msgstr "Цвет для подсветки (активной)"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Перекрасить страницы" msgstr "Перекрасить страницы"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Плавная прокрутка" msgstr "Плавная прокрутка"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "Увеличить количество страниц в ряду" msgstr "Увеличить количество страниц в ряду"
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "" msgstr ""
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "" msgstr ""
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Прозрачность подсветки" msgstr "Прозрачность подсветки"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Рендер 'Загружается ...'" msgstr "Рендер 'Загружается ...'"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "" msgstr ""
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Показывать скрытые файлы и директории" msgstr "Показывать скрытые файлы и директории"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Показывать директории" msgstr "Показывать директории"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Всегда открывать на первой странице" msgstr "Всегда открывать на первой странице"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr ""
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr ""
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Добавить закладку" msgstr "Добавить закладку"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Удалить закладку" msgstr "Удалить закладку"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Показать все закладки" msgstr "Показать все закладки"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Закрыть текущий файл" msgstr "Закрыть текущий файл"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Показать информацию о файле" msgstr "Показать информацию о файле"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Помощь" msgstr "Помощь"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Открыть документ" msgstr "Открыть документ"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Выход" msgstr "Выход"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Печать" msgstr "Печать"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Сохранить документ" msgstr "Сохранить документ"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Сохранить документ (с перезапиьсю)" msgstr "Сохранить документ (с перезапиьсю)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Сохранить прикреплённые файлы" msgstr "Сохранить прикреплённые файлы"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Сохранить смещение страницы" msgstr "Сохранить смещение страницы"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "Пометить текущую позицию в документе" msgstr "Пометить текущую позицию в документе"
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "Удалить указанные пометки" msgstr "Удалить указанные пометки"
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr ""
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr ""
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Не удалось запустить xdg-open" msgstr "Не удалось запустить xdg-open"
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "Сменить материнское окно на окно, указанное в xid" msgstr "Сменить материнское окно на окно, указанное в xid"
@ -383,27 +414,27 @@ msgstr "Показать информацию о файле"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "" msgstr ""
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Выделенный текст скопирован в буфер: %s" msgstr "Выделенный текст скопирован в буфер: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Скопировать изображение" msgstr "Скопировать изображение"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "" msgstr ""
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "В документе нету индекса" msgstr "В документе нету индекса"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[No name]" msgstr "[No name]"

View file

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-04-03 15:25+0000\n" "PO-Revision-Date: 2012-04-03 15:25+0000\n"
"Last-Translator: mankand007 <mankand007@gmail.com>\n" "Last-Translator: mankand007 <mankand007@gmail.com>\n"
"Language-Team: Tamil (India) (http://www.transifex.net/projects/p/zathura/" "Language-Team: Tamil (India) (http://www.transifex.net/projects/p/zathura/"
@ -18,23 +18,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "கொடுக்கப்பட்ட உள்ளீடு(input) '%s' தவறு" msgstr "கொடுக்கப்பட்ட உள்ளீடு(input) '%s' தவறு"
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "கொடுக்கப்பட்ட index '%s' தவறு" msgstr "கொடுக்கப்பட்ட index '%s' தவறு"
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "எந்தக் ஆவணமும் திறக்கப்படவில்லை" msgstr "எந்தக் ஆவணமும் திறக்கப்படவில்லை"
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "கொடுக்கப்பட்ட arguments-களின் எண்ணிக்கை தவறு" msgstr "கொடுக்கப்பட்ட arguments-களின் எண்ணிக்கை தவறு"
@ -92,37 +93,37 @@ msgstr "ஆவணத்தை சேமிக்க இயலவில்லை"
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "கொடுக்கப்பட்ட argument-களின் எண்ணிக்கை தவறு" msgstr "கொடுக்கப்பட்ட argument-களின் எண்ணிக்கை தவறு"
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "" msgstr ""
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr ""
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "Argument ஒரு எண்ணாக இருக்க வேண்டும்" msgstr "Argument ஒரு எண்ணாக இருக்க வேண்டும்"
@ -141,211 +142,241 @@ msgid "Images"
msgstr "" msgstr ""
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "" msgstr ""
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Zoom அமைப்பு" msgstr "Zoom அமைப்பு"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "இரு பக்கங்களுக்கிடையில் உள்ள நிரப்பல்(padding)" msgstr "இரு பக்கங்களுக்கிடையில் உள்ள நிரப்பல்(padding)"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "ஒரு வரிசையில் எத்தனை பக்கங்களைக் காட்ட வேண்டும்" msgstr "ஒரு வரிசையில் எத்தனை பக்கங்களைக் காட்ட வேண்டும்"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "திரை உருளல்(scroll) அளவு" msgstr "திரை உருளல்(scroll) அளவு"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Zoom minimum" msgid "Full page scroll overlap"
msgstr "முடிந்தவரை சிறியதாகக் காட்டு"
#: ../config.c:121
msgid "Zoom maximum"
msgstr "முடிந்தவரை பெரிதாகக் காட்டு"
#: ../config.c:123
msgid "Life time (in seconds) of a hidden page"
msgstr ""
#: ../config.c:124
msgid "Amount of seconds between each cache purge"
msgstr ""
#: ../config.c:126
msgid "Recoloring (dark color)"
msgstr ""
#: ../config.c:128
msgid "Recoloring (light color)"
msgstr ""
#: ../config.c:130
msgid "Color for highlighting"
msgstr ""
#: ../config.c:132
msgid "Color for highlighting (active)"
msgstr ""
#: ../config.c:136
msgid "Recolor pages"
msgstr ""
#: ../config.c:138
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../config.c:140
msgid "Wrap scrolling"
msgstr ""
#: ../config.c:142
msgid "Advance number of pages per row"
msgstr ""
#: ../config.c:144
msgid "Horizontally centered zoom"
msgstr ""
#: ../config.c:146
msgid "Center result horizontally"
msgstr ""
#: ../config.c:148
msgid "Transparency for highlighting"
msgstr ""
#: ../config.c:150
msgid "Render 'Loading ...'"
msgstr "" msgstr ""
#: ../config.c:151 #: ../config.c:151
msgid "Zoom minimum"
msgstr "முடிந்தவரை சிறியதாகக் காட்டு"
#: ../config.c:153
msgid "Zoom maximum"
msgstr "முடிந்தவரை பெரிதாகக் காட்டு"
#: ../config.c:155
msgid "Life time (in seconds) of a hidden page"
msgstr ""
#: ../config.c:156
msgid "Amount of seconds between each cache purge"
msgstr ""
#: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)"
msgstr ""
#: ../config.c:162
msgid "Recoloring (light color)"
msgstr ""
#: ../config.c:164
msgid "Color for highlighting"
msgstr ""
#: ../config.c:166
msgid "Color for highlighting (active)"
msgstr ""
#: ../config.c:170
msgid "Recolor pages"
msgstr ""
#: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only"
msgstr ""
#: ../config.c:174
msgid "Wrap scrolling"
msgstr ""
#: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row"
msgstr ""
#: ../config.c:180
msgid "Horizontally centered zoom"
msgstr ""
#: ../config.c:182
msgid "Center result horizontally"
msgstr ""
#: ../config.c:184
msgid "Transparency for highlighting"
msgstr ""
#: ../config.c:186
msgid "Render 'Loading ...'"
msgstr ""
#: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "" msgstr ""
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "" msgstr ""
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "" msgstr ""
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "" msgstr ""
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr ""
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr ""
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "புதிய bookmark உருவாக்கு" msgstr "புதிய bookmark உருவாக்கு"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Bookmark-ஐ அழித்துவிடு" msgstr "Bookmark-ஐ அழித்துவிடு"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "அனைத்து bookmark-களையும் பட்டியலிடு" msgstr "அனைத்து bookmark-களையும் பட்டியலிடு"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "" msgstr ""
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "ஆவணம் பற்றிய தகவல்களைக் காட்டு" msgstr "ஆவணம் பற்றிய தகவல்களைக் காட்டு"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "உதவியைக் காட்டு" msgstr "உதவியைக் காட்டு"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "ஒரு ஆவணத்தைத் திற" msgstr "ஒரு ஆவணத்தைத் திற"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "zathura-வை விட்டு வெளியேறு" msgstr "zathura-வை விட்டு வெளியேறு"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "ஆவணத்தை அச்சிடு" msgstr "ஆவணத்தை அச்சிடு"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "ஆவணத்தை சேமிக்கவும்" msgstr "ஆவணத்தை சேமிக்கவும்"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "" msgstr ""
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "இணைப்புகளைச் சேமிக்கவும்" msgstr "இணைப்புகளைச் சேமிக்கவும்"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "" msgstr ""
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "" msgstr ""
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "" msgstr ""
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr ""
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr ""
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "xdg-open-ஐ இயக்க முடியவில்லை" msgstr "xdg-open-ஐ இயக்க முடியவில்லை"
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "" msgstr ""
@ -382,27 +413,27 @@ msgstr "ஆவணம் பற்றிய தகவல்களைக் கா
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "" msgstr ""
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "" msgstr ""
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "படத்தை ஒரு பிரதியெடு" msgstr "படத்தை ஒரு பிரதியெடு"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "" msgstr ""
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "இந்த ஆவணத்தில் எந்த index-ம் இல்லை" msgstr "இந்த ஆவணத்தில் எந்த index-ம் இல்லை"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "பெயரற்ற ஆவணம்" msgstr "பெயரற்ற ஆவணம்"

173
po/tr.po
View file

@ -7,8 +7,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-05-01 20:38+0000\n" "PO-Revision-Date: 2012-05-01 20:38+0000\n"
"Last-Translator: hsngrms <dead-bodies-everywhere@hotmail.com>\n" "Last-Translator: hsngrms <dead-bodies-everywhere@hotmail.com>\n"
"Language-Team: Turkish (http://www.transifex.net/projects/p/zathura/language/" "Language-Team: Turkish (http://www.transifex.net/projects/p/zathura/language/"
@ -19,23 +19,24 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n" "Plural-Forms: nplurals=1; plural=0\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Hatalı girdi '%s'" msgstr "Hatalı girdi '%s'"
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Hatalı dizin '%s'" msgstr "Hatalı dizin '%s'"
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Açık belge yok." msgstr "Açık belge yok."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Yanlış sayıda argüman" msgstr "Yanlış sayıda argüman"
@ -93,37 +94,37 @@ msgstr "Belge kaydedilemedi."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Yanlış sayıda argüman." msgstr "Yanlış sayıda argüman."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "'%s' eki '%s' konumuna yazılamadı." msgstr "'%s' eki '%s' konumuna yazılamadı."
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "'%s' eki '%s' konumuna yazıldı." msgstr "'%s' eki '%s' konumuna yazıldı."
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "'%s' eki '%s' konumuna yazıldı." msgstr "'%s' eki '%s' konumuna yazıldı."
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "'%s' eki '%s' konumuna yazılamadı." msgstr "'%s' eki '%s' konumuna yazılamadı."
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "" msgstr ""
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr ""
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "Argüman bir sayı olmalı." msgstr "Argüman bir sayı olmalı."
@ -142,211 +143,241 @@ msgid "Images"
msgstr "" msgstr ""
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Veritabanı arkayüzü" msgstr "Veritabanı arkayüzü"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Yakınlaşma/uzaklaşma aralığı" msgstr "Yakınlaşma/uzaklaşma aralığı"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Sayfalar arasındaki boşluk" msgstr "Sayfalar arasındaki boşluk"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Satır başına sayfa sayısı" msgstr "Satır başına sayfa sayısı"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Kaydırma aralığı" msgstr "Kaydırma aralığı"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "En fazla uzaklaşma" msgstr "En fazla uzaklaşma"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "En fazla yakınlaşma" msgstr "En fazla yakınlaşma"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "Gizli pencerenin açık kalma süresi (saniye)" msgstr "Gizli pencerenin açık kalma süresi (saniye)"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "Önbellek temizliği yapılma sıklığı, saniye cinsinden" msgstr "Önbellek temizliği yapılma sıklığı, saniye cinsinden"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Renk değişimi (koyu renk)" msgstr "Renk değişimi (koyu renk)"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Renk değişimi (açık renk)" msgstr "Renk değişimi (açık renk)"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "İşaretleme rengi" msgstr "İşaretleme rengi"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "İşaretleme rengi (etkin)" msgstr "İşaretleme rengi (etkin)"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Sayga rengini değiştir" msgstr "Sayga rengini değiştir"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Kaydırmayı sarmala" msgstr "Kaydırmayı sarmala"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "Satır başına sayfa sayısı" msgstr "Satır başına sayfa sayısı"
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "" msgstr ""
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "" msgstr ""
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Ön plana çıkarmak için saydamlaştır" msgstr "Ön plana çıkarmak için saydamlaştır"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "'Yüklüyor ...' yazısını göster" msgstr "'Yüklüyor ...' yazısını göster"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Dosya açarken ayarla" msgstr "Dosya açarken ayarla"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Gizli dosyaları ve dizinleri göster" msgstr "Gizli dosyaları ve dizinleri göster"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Dizinleri göster" msgstr "Dizinleri göster"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Her zaman ilk sayfayı aç" msgstr "Her zaman ilk sayfayı aç"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr ""
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr ""
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Yer imi ekle" msgstr "Yer imi ekle"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Yer imi sil" msgstr "Yer imi sil"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Yer imlerini listele" msgstr "Yer imlerini listele"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Geçerli dosyayı kapat" msgstr "Geçerli dosyayı kapat"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Dosya bilgisi göster" msgstr "Dosya bilgisi göster"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Yardım bilgisi göster" msgstr "Yardım bilgisi göster"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Belge aç" msgstr "Belge aç"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Zathura'yı kapat" msgstr "Zathura'yı kapat"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Belge yazdır" msgstr "Belge yazdır"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Belgeyi kaydet" msgstr "Belgeyi kaydet"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Belgeyi kaydet (ve sormadan üzerine yaz)" msgstr "Belgeyi kaydet (ve sormadan üzerine yaz)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Ekleri kaydet" msgstr "Ekleri kaydet"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Sayfa derinliğini ayarla" msgstr "Sayfa derinliğini ayarla"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "Bu belgede bu konumu işaretle" msgstr "Bu belgede bu konumu işaretle"
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "Seçilen işaretlemeleri sil" msgstr "Seçilen işaretlemeleri sil"
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr ""
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr ""
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "xdg-open çalıştırılamadı" msgstr "xdg-open çalıştırılamadı"
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "Xid tarafından belirlendiği gibi bir üst seviye pencereye bağlı" msgstr "Xid tarafından belirlendiği gibi bir üst seviye pencereye bağlı"
@ -383,27 +414,27 @@ msgstr "Dosya bilgisi göster"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "Yüklüyor ..." msgstr "Yüklüyor ..."
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Seçili metin panoya kopyalandı: %s" msgstr "Seçili metin panoya kopyalandı: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Resim kopyala" msgstr "Resim kopyala"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "" msgstr ""
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Bu belge fihrist içermiyor" msgstr "Bu belge fihrist içermiyor"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[İsimsiz]" msgstr "[İsimsiz]"

View file

@ -6,8 +6,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: zathura\n" "Project-Id-Version: zathura\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
"POT-Creation-Date: 2012-08-30 19:46+0200\n" "POT-Creation-Date: 2013-01-13 15:08+0100\n"
"PO-Revision-Date: 2012-06-20 14:58+0000\n" "PO-Revision-Date: 2012-06-20 14:58+0000\n"
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n" "Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
"Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/projects/p/" "Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/projects/p/"
@ -19,23 +19,24 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && 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" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
#: ../callbacks.c:204 #: ../callbacks.c:218
#, c-format #, c-format
msgid "Invalid input '%s' given." msgid "Invalid input '%s' given."
msgstr "Вказано невірний аргумент: %s." msgstr "Вказано невірний аргумент: %s."
#: ../callbacks.c:232 #: ../callbacks.c:256
#, c-format #, c-format
msgid "Invalid index '%s' given." msgid "Invalid index '%s' given."
msgstr "Вказано невірний індекс: %s" msgstr "Вказано невірний індекс: %s"
#: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139 #: ../commands.c:35 ../commands.c:70 ../commands.c:97 ../commands.c:139
#: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:400 #: ../commands.c:253 ../commands.c:283 ../commands.c:309 ../commands.c:408
#: ../commands.c:521 ../shortcuts.c:454 ../shortcuts.c:919 #: ../commands.c:529 ../shortcuts.c:475 ../shortcuts.c:1053
#: ../shortcuts.c:1082
msgid "No document opened." msgid "No document opened."
msgstr "Документ не відкрито." msgstr "Документ не відкрито."
#: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:405 #: ../commands.c:41 ../commands.c:76 ../commands.c:103 ../commands.c:413
msgid "Invalid number of arguments given." msgid "Invalid number of arguments given."
msgstr "Вказана невірна кількість аргументів." msgstr "Вказана невірна кількість аргументів."
@ -93,37 +94,37 @@ msgstr "Документ не вдалося зберегти."
msgid "Invalid number of arguments." msgid "Invalid number of arguments."
msgstr "Невірна кількість аргументів." msgstr "Невірна кількість аргументів."
#: ../commands.c:424 #: ../commands.c:432
#, c-format #, c-format
msgid "Couldn't write attachment '%s' to '%s'." msgid "Couldn't write attachment '%s' to '%s'."
msgstr "Неможливо записати прикріплення '%s' до '%s'." msgstr "Неможливо записати прикріплення '%s' до '%s'."
#: ../commands.c:426 #: ../commands.c:434
#, c-format #, c-format
msgid "Wrote attachment '%s' to '%s'." msgid "Wrote attachment '%s' to '%s'."
msgstr "Прикріплення записано %s до %s." msgstr "Прикріплення записано %s до %s."
#: ../commands.c:470 #: ../commands.c:478
#, c-format #, c-format
msgid "Wrote image '%s' to '%s'." msgid "Wrote image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:472 #: ../commands.c:480
#, c-format #, c-format
msgid "Couldn't write image '%s' to '%s'." msgid "Couldn't write image '%s' to '%s'."
msgstr "" msgstr ""
#: ../commands.c:479 #: ../commands.c:487
#, c-format #, c-format
msgid "Unknown image '%s'." msgid "Unknown image '%s'."
msgstr "" msgstr ""
#: ../commands.c:483 #: ../commands.c:491
#, c-format #, c-format
msgid "Unknown attachment or image '%s'." msgid "Unknown attachment or image '%s'."
msgstr "" msgstr ""
#: ../commands.c:534 #: ../commands.c:542
msgid "Argument must be a number." msgid "Argument must be a number."
msgstr "Аргумент повинен бути цифрою." msgstr "Аргумент повинен бути цифрою."
@ -142,211 +143,241 @@ msgid "Images"
msgstr "" msgstr ""
#. zathura settings #. zathura settings
#: ../config.c:105 #: ../config.c:135
msgid "Database backend" msgid "Database backend"
msgstr "Буфер бази" msgstr "Буфер бази"
#: ../config.c:107 #: ../config.c:137
msgid "Zoom step" msgid "Zoom step"
msgstr "Збільшення" msgstr "Збільшення"
#: ../config.c:109 #: ../config.c:139
msgid "Padding between pages" msgid "Padding between pages"
msgstr "Заповнення між сторінками" msgstr "Заповнення між сторінками"
#: ../config.c:111 #: ../config.c:141
msgid "Number of pages per row" msgid "Number of pages per row"
msgstr "Кількість сторінок в одному рядку" msgstr "Кількість сторінок в одному рядку"
#: ../config.c:113 #: ../config.c:143
msgid "Column of the first page" msgid "Column of the first page"
msgstr "" msgstr ""
#: ../config.c:115 #: ../config.c:145
msgid "Scroll step" msgid "Scroll step"
msgstr "Прокручування" msgstr "Прокручування"
#: ../config.c:117 #: ../config.c:147
msgid "Horizontal scroll step" msgid "Horizontal scroll step"
msgstr "" msgstr ""
#: ../config.c:119 #: ../config.c:149
msgid "Full page scroll overlap"
msgstr ""
#: ../config.c:151
msgid "Zoom minimum" msgid "Zoom minimum"
msgstr "Максимальне зменшення" msgstr "Максимальне зменшення"
#: ../config.c:121 #: ../config.c:153
msgid "Zoom maximum" msgid "Zoom maximum"
msgstr "Максимальне збільшення" msgstr "Максимальне збільшення"
#: ../config.c:123 #: ../config.c:155
msgid "Life time (in seconds) of a hidden page" msgid "Life time (in seconds) of a hidden page"
msgstr "Час (у сек) схованої сторінки" msgstr "Час (у сек) схованої сторінки"
#: ../config.c:124 #: ../config.c:156
msgid "Amount of seconds between each cache purge" msgid "Amount of seconds between each cache purge"
msgstr "Кількість секунд між кожним очищенням кешу" msgstr "Кількість секунд між кожним очищенням кешу"
#: ../config.c:126 #: ../config.c:158
msgid "Number of positions to remember in the jumplist"
msgstr ""
#: ../config.c:160
msgid "Recoloring (dark color)" msgid "Recoloring (dark color)"
msgstr "Перефарбування (темний колір)" msgstr "Перефарбування (темний колір)"
#: ../config.c:128 #: ../config.c:162
msgid "Recoloring (light color)" msgid "Recoloring (light color)"
msgstr "Перефарбування (світлий колір)" msgstr "Перефарбування (світлий колір)"
#: ../config.c:130 #: ../config.c:164
msgid "Color for highlighting" msgid "Color for highlighting"
msgstr "Колір для виділення" msgstr "Колір для виділення"
#: ../config.c:132 #: ../config.c:166
msgid "Color for highlighting (active)" msgid "Color for highlighting (active)"
msgstr "Колір для виділення (активний)" msgstr "Колір для виділення (активний)"
#: ../config.c:136 #: ../config.c:170
msgid "Recolor pages" msgid "Recolor pages"
msgstr "Змінити кольори" msgstr "Змінити кольори"
#: ../config.c:138 #: ../config.c:172
msgid "When recoloring keep original hue and adjust lightness only" msgid "When recoloring keep original hue and adjust lightness only"
msgstr "" msgstr ""
#: ../config.c:140 #: ../config.c:174
msgid "Wrap scrolling" msgid "Wrap scrolling"
msgstr "Плавне прокручування" msgstr "Плавне прокручування"
#: ../config.c:142 #: ../config.c:176
msgid "Page aware scrolling"
msgstr ""
#: ../config.c:178
msgid "Advance number of pages per row" msgid "Advance number of pages per row"
msgstr "" msgstr ""
#: ../config.c:144 #: ../config.c:180
msgid "Horizontally centered zoom" msgid "Horizontally centered zoom"
msgstr "" msgstr ""
#: ../config.c:146 #: ../config.c:182
msgid "Center result horizontally" msgid "Center result horizontally"
msgstr "" msgstr ""
#: ../config.c:148 #: ../config.c:184
msgid "Transparency for highlighting" msgid "Transparency for highlighting"
msgstr "Прозорість для виділення" msgstr "Прозорість для виділення"
#: ../config.c:150 #: ../config.c:186
msgid "Render 'Loading ...'" msgid "Render 'Loading ...'"
msgstr "Рендер 'Завантажується ...'" msgstr "Рендер 'Завантажується ...'"
#: ../config.c:151 #: ../config.c:187
msgid "Adjust to when opening file" msgid "Adjust to when opening file"
msgstr "Підлаштовутись при відкритті файлу" msgstr "Підлаштовутись при відкритті файлу"
#: ../config.c:153 #: ../config.c:189
msgid "Show hidden files and directories" msgid "Show hidden files and directories"
msgstr "Показати приховані файли та директорії" msgstr "Показати приховані файли та директорії"
#: ../config.c:155 #: ../config.c:191
msgid "Show directories" msgid "Show directories"
msgstr "Показати диреторії" msgstr "Показати диреторії"
#: ../config.c:157 #: ../config.c:193
msgid "Always open on first page" msgid "Always open on first page"
msgstr "Завжди відкривати на першій сторінці" msgstr "Завжди відкривати на першій сторінці"
#: ../config.c:159 #: ../config.c:195
msgid "Highlight search results" msgid "Highlight search results"
msgstr "" msgstr ""
#: ../config.c:161 #: ../config.c:197
msgid "Enable incremental search"
msgstr ""
#: ../config.c:199
msgid "Clear search results on abort" msgid "Clear search results on abort"
msgstr "" msgstr ""
#: ../config.c:163 #: ../config.c:201
msgid "Use basename of the file in the window title" msgid "Use basename of the file in the window title"
msgstr "" msgstr ""
#: ../config.c:165 ../main.c:60 #: ../config.c:203 ../main.c:60
msgid "Enable synctex support" msgid "Enable synctex support"
msgstr "" msgstr ""
#. define default inputbar commands #. define default inputbar commands
#: ../config.c:293 #: ../config.c:359
msgid "Add a bookmark" msgid "Add a bookmark"
msgstr "Додати закладку" msgstr "Додати закладку"
#: ../config.c:294 #: ../config.c:360
msgid "Delete a bookmark" msgid "Delete a bookmark"
msgstr "Вилучити закладку" msgstr "Вилучити закладку"
#: ../config.c:295 #: ../config.c:361
msgid "List all bookmarks" msgid "List all bookmarks"
msgstr "Дивитись усі закладки" msgstr "Дивитись усі закладки"
#: ../config.c:296 #: ../config.c:362
msgid "Close current file" msgid "Close current file"
msgstr "Закрити документ" msgstr "Закрити документ"
#: ../config.c:297 #: ../config.c:363
msgid "Show file information" msgid "Show file information"
msgstr "Показати інформацію файлу" msgstr "Показати інформацію файлу"
#: ../config.c:298 #: ../config.c:364
msgid "Execute a command" msgid "Execute a command"
msgstr "" msgstr ""
#: ../config.c:299 #: ../config.c:365
msgid "Show help" msgid "Show help"
msgstr "Показати довідку" msgstr "Показати довідку"
#: ../config.c:300 #: ../config.c:366
msgid "Open document" msgid "Open document"
msgstr "Відкрити документ" msgstr "Відкрити документ"
#: ../config.c:301 #: ../config.c:367
msgid "Close zathura" msgid "Close zathura"
msgstr "Вийти із zathura" msgstr "Вийти із zathura"
#: ../config.c:302 #: ../config.c:368
msgid "Print document" msgid "Print document"
msgstr "Друкувати документ" msgstr "Друкувати документ"
#: ../config.c:303 #: ../config.c:369
msgid "Save document" msgid "Save document"
msgstr "Зберегти документ" msgstr "Зберегти документ"
#: ../config.c:304 #: ../config.c:370
msgid "Save document (and force overwriting)" msgid "Save document (and force overwriting)"
msgstr "Зберегти документ (форсувати перезапис)" msgstr "Зберегти документ (форсувати перезапис)"
#: ../config.c:305 #: ../config.c:371
msgid "Save attachments" msgid "Save attachments"
msgstr "Зберегти прикріплення" msgstr "Зберегти прикріплення"
#: ../config.c:306 #: ../config.c:372
msgid "Set page offset" msgid "Set page offset"
msgstr "Встановити зміщення сторінки" msgstr "Встановити зміщення сторінки"
#: ../config.c:307 #: ../config.c:373
msgid "Mark current location within the document" msgid "Mark current location within the document"
msgstr "" msgstr ""
#: ../config.c:308 #: ../config.c:374
msgid "Delete the specified marks" msgid "Delete the specified marks"
msgstr "" msgstr ""
#: ../config.c:309 #: ../config.c:375
msgid "Don't highlight current search results" msgid "Don't highlight current search results"
msgstr "" msgstr ""
#: ../config.c:310 #: ../config.c:376
msgid "Highlight current search results" msgid "Highlight current search results"
msgstr "" msgstr ""
#: ../config.c:311 #: ../config.c:377
msgid "Show version information" msgid "Show version information"
msgstr "" msgstr ""
#: ../links.c:162 ../links.c:219 #: ../links.c:161 ../links.c:240
msgid "Failed to run xdg-open." msgid "Failed to run xdg-open."
msgstr "Запуск xdg-open не вдався." msgstr "Запуск xdg-open не вдався."
#: ../links.c:179
#, c-format
msgid "Link: page %d"
msgstr ""
#: ../links.c:186
#, c-format
msgid "Link: %s"
msgstr ""
#: ../links.c:190
msgid "Link: Invalid"
msgstr ""
#: ../main.c:52 #: ../main.c:52
msgid "Reparents to window specified by xid" msgid "Reparents to window specified by xid"
msgstr "Вертатися до вікна, вказаного xid" msgstr "Вертатися до вікна, вказаного xid"
@ -383,27 +414,27 @@ msgstr "Показати інформацію файлу"
msgid "Synctex editor (forwarded to the synctex command)" msgid "Synctex editor (forwarded to the synctex command)"
msgstr "" msgstr ""
#: ../page-widget.c:456 #: ../page-widget.c:455
msgid "Loading..." msgid "Loading..."
msgstr "" msgstr ""
#: ../page-widget.c:643 #: ../page-widget.c:646
#, c-format #, c-format
msgid "Copied selected text to clipboard: %s" msgid "Copied selected text to clipboard: %s"
msgstr "Вибраний текст скопійовано до буферу: %s" msgstr "Вибраний текст скопійовано до буферу: %s"
#: ../page-widget.c:741 #: ../page-widget.c:744
msgid "Copy image" msgid "Copy image"
msgstr "Копіювати картинку" msgstr "Копіювати картинку"
#: ../page-widget.c:742 #: ../page-widget.c:745
msgid "Save image as" msgid "Save image as"
msgstr "" msgstr ""
#: ../shortcuts.c:825 #: ../shortcuts.c:956
msgid "This document does not contain any index" msgid "This document does not contain any index"
msgstr "Індекс відсутній в цьому документі" msgstr "Індекс відсутній в цьому документі"
#: ../zathura.c:189 ../zathura.c:843 #: ../zathura.c:193 ../zathura.c:865
msgid "[No name]" msgid "[No name]"
msgstr "[Без назви]" msgstr "[Без назви]"

86
print.c
View file

@ -9,12 +9,12 @@
#include <girara/statusbar.h> #include <girara/statusbar.h>
static void cb_print_draw_page(GtkPrintOperation* print_operation, static void cb_print_draw_page(GtkPrintOperation* print_operation,
GtkPrintContext* context, gint page_number, zathura_t* zathura); GtkPrintContext* context, gint page_number, zathura_t* zathura);
static void cb_print_end(GtkPrintOperation* print_operation, GtkPrintContext* static void cb_print_end(GtkPrintOperation* print_operation, GtkPrintContext*
context, zathura_t* zathura); context, zathura_t* zathura);
static void cb_print_request_page_setup(GtkPrintOperation* print_operation, static void cb_print_request_page_setup(GtkPrintOperation* print_operation,
GtkPrintContext* context, gint page_number, GtkPageSetup* setup, zathura_t* GtkPrintContext* context, gint page_number, GtkPageSetup* setup, zathura_t*
zathura); zathura);
void void
print(zathura_t* zathura) print(zathura_t* zathura)
@ -37,6 +37,7 @@ print(zathura_t* zathura)
gtk_print_operation_set_n_pages(print_operation, zathura_document_get_number_of_pages(zathura->document)); gtk_print_operation_set_n_pages(print_operation, zathura_document_get_number_of_pages(zathura->document));
gtk_print_operation_set_current_page(print_operation, zathura_document_get_current_page_number(zathura->document)); gtk_print_operation_set_current_page(print_operation, zathura_document_get_current_page_number(zathura->document));
gtk_print_operation_set_use_full_page(print_operation, TRUE); gtk_print_operation_set_use_full_page(print_operation, TRUE);
gtk_print_operation_set_embed_page_setup(print_operation, TRUE);
/* print operation signals */ /* print operation signals */
g_signal_connect(print_operation, "draw-page", G_CALLBACK(cb_print_draw_page), zathura); g_signal_connect(print_operation, "draw-page", G_CALLBACK(cb_print_draw_page), zathura);
@ -45,7 +46,7 @@ print(zathura_t* zathura)
/* print */ /* print */
GtkPrintOperationResult result = gtk_print_operation_run(print_operation, GtkPrintOperationResult result = gtk_print_operation_run(print_operation,
GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, NULL, NULL); GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, NULL, NULL);
if (result == GTK_PRINT_OPERATION_RESULT_APPLY) { if (result == GTK_PRINT_OPERATION_RESULT_APPLY) {
if (zathura->print.settings != NULL) { if (zathura->print.settings != NULL) {
@ -67,7 +68,7 @@ print(zathura_t* zathura)
static void static void
cb_print_end(GtkPrintOperation* UNUSED(print_operation), GtkPrintContext* cb_print_end(GtkPrintOperation* UNUSED(print_operation), GtkPrintContext*
UNUSED(context), zathura_t* zathura) UNUSED(context), zathura_t* zathura)
{ {
if (zathura == NULL || zathura->ui.session == NULL || zathura->document == NULL) { if (zathura == NULL || zathura->ui.session == NULL || zathura->document == NULL) {
return; return;
@ -77,42 +78,97 @@ cb_print_end(GtkPrintOperation* UNUSED(print_operation), GtkPrintContext*
if (file_path != NULL) { if (file_path != NULL) {
girara_statusbar_item_set_text(zathura->ui.session, girara_statusbar_item_set_text(zathura->ui.session,
zathura->ui.statusbar.file, file_path); zathura->ui.statusbar.file, file_path);
} }
} }
static void static void
cb_print_draw_page(GtkPrintOperation* UNUSED(print_operation), GtkPrintContext* cb_print_draw_page(GtkPrintOperation* print_operation, GtkPrintContext*
context, gint page_number, zathura_t* zathura) context, gint page_number, zathura_t* zathura)
{ {
if (context == NULL || zathura == NULL || zathura->document == NULL || if (context == NULL || zathura == NULL || zathura->document == NULL ||
zathura->ui.session == NULL || zathura->ui.statusbar.file == NULL) { zathura->ui.session == NULL || zathura->ui.statusbar.file == NULL) {
gtk_print_operation_cancel(print_operation);
return; return;
} }
/* update statusbar */ /* Update statusbar. */
char* tmp = g_strdup_printf("Printing %d...", page_number); char* tmp = g_strdup_printf("Printing %d...", page_number);
girara_statusbar_item_set_text(zathura->ui.session, girara_statusbar_item_set_text(zathura->ui.session,
zathura->ui.statusbar.file, tmp); zathura->ui.statusbar.file, tmp);
g_free(tmp); g_free(tmp);
/* render page */ /* Get the page and cairo handle. */
cairo_t* cairo = gtk_print_context_get_cairo_context(context); cairo_t* cairo = gtk_print_context_get_cairo_context(context);
zathura_page_t* page = zathura_document_get_page(zathura->document, page_number); zathura_page_t* page = zathura_document_get_page(zathura->document, page_number);
if (cairo == NULL || page == NULL) { if (cairo == NULL || page == NULL) {
gtk_print_operation_cancel(print_operation);
return; return;
} }
/* Try to render the page without a temporary surface. This only works with
* plugins that support rendering to any surface. */
girara_debug("printing page %d ...", page_number); girara_debug("printing page %d ...", page_number);
render_lock(zathura->sync.render_thread); render_lock(zathura->sync.render_thread);
zathura_page_render(page, cairo, true); int err = zathura_page_render(page, cairo, true);
render_unlock(zathura->sync.render_thread); render_unlock(zathura->sync.render_thread);
if (err == ZATHURA_ERROR_OK) {
return;
}
/* Try to render the page on a temporary image surface. */
const gdouble width = gtk_print_context_get_width(context);
const gdouble height = gtk_print_context_get_height(context);
const double page_height = zathura_page_get_height(page);
const double page_width = zathura_page_get_width(page);
cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_RGB24, page_width, page_height);
if (surface == NULL) {
gtk_print_operation_cancel(print_operation);
return;
}
cairo_t* temp_cairo = cairo_create(surface);
if (cairo == NULL) {
gtk_print_operation_cancel(print_operation);
cairo_surface_destroy(surface);
return;
}
/* Draw a white background. */
cairo_save(temp_cairo);
cairo_set_source_rgb(temp_cairo, 1, 1, 1);
cairo_rectangle(temp_cairo, 0, 0, page_width, page_height);
cairo_fill(temp_cairo);
cairo_restore(temp_cairo);
/* Render the page to the temporary surface */
girara_debug("printing page %d ...", page_number);
render_lock(zathura->sync.render_thread);
err = zathura_page_render(page, temp_cairo, true);
render_unlock(zathura->sync.render_thread);
if (err != ZATHURA_ERROR_OK) {
cairo_destroy(temp_cairo);
cairo_surface_destroy(surface);
gtk_print_operation_cancel(print_operation);
return;
}
/* Rescale the page and keep the aspect ratio */
const gdouble scale = MIN(width / page_width, height / page_height);
cairo_scale(cairo, scale, scale);
/* Blit temporary surface to original cairo object. */
cairo_set_source_surface(cairo, surface, 0.0, 0.0);
cairo_paint(cairo);
cairo_destroy(temp_cairo);
cairo_surface_destroy(surface);
} }
static void static void
cb_print_request_page_setup(GtkPrintOperation* UNUSED(print_operation), cb_print_request_page_setup(GtkPrintOperation* UNUSED(print_operation),
GtkPrintContext* UNUSED(context), gint page_number, GtkPageSetup* setup, GtkPrintContext* UNUSED(context), gint page_number, GtkPageSetup* setup,
zathura_t* zathura) zathura_t* zathura)
{ {
if (zathura == NULL || zathura->document == NULL) { if (zathura == NULL || zathura->document == NULL) {
return; return;

View file

@ -17,10 +17,9 @@ static void render_job(void* data, void* user_data);
static bool render(zathura_t* zathura, zathura_page_t* page); static bool render(zathura_t* zathura, zathura_page_t* page);
static gint render_thread_sort(gconstpointer a, gconstpointer b, gpointer data); static gint render_thread_sort(gconstpointer a, gconstpointer b, gpointer data);
struct render_thread_s struct render_thread_s {
{
GThreadPool* pool; /**< Pool of threads */ GThreadPool* pool; /**< Pool of threads */
GStaticMutex mutex; /**< Render lock */ GMutex mutex; /**< Render lock */
bool about_to_close; /**< Render thread is to be freed */ bool about_to_close; /**< Render thread is to be freed */
}; };
@ -52,7 +51,7 @@ render_init(zathura_t* zathura)
render_thread->about_to_close = false; render_thread->about_to_close = false;
g_thread_pool_set_sort_function(render_thread->pool, render_thread_sort, zathura); g_thread_pool_set_sort_function(render_thread->pool, render_thread_sort, zathura);
g_static_mutex_init(&render_thread->mutex); g_mutex_init(&render_thread->mutex);
return render_thread; return render_thread;
@ -74,7 +73,6 @@ render_free(render_thread_t* render_thread)
g_thread_pool_free(render_thread->pool, TRUE, TRUE); g_thread_pool_free(render_thread->pool, TRUE, TRUE);
} }
g_static_mutex_free(&render_thread->mutex);
g_free(render_thread); g_free(render_thread);
} }
@ -330,7 +328,7 @@ render_lock(render_thread_t* render_thread)
return; return;
} }
g_static_mutex_lock(&render_thread->mutex); g_mutex_lock(&render_thread->mutex);
} }
void void
@ -340,5 +338,5 @@ render_unlock(render_thread_t* render_thread)
return; return;
} }
g_static_mutex_unlock(&render_thread->mutex); g_mutex_unlock(&render_thread->mutex);
} }

View file

@ -18,9 +18,42 @@
#include "print.h" #include "print.h"
#include "page-widget.h" #include "page-widget.h"
/* Helper function; see sc_display_link and sc_follow. */
static bool
draw_links(zathura_t* zathura)
{
/* set pages to draw links */
bool show_links = false;
unsigned int page_offset = 0;
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;
}
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
g_object_set(page_widget, "search-results", NULL, NULL);
if (zathura_page_get_visibility(page) == true) {
g_object_set(page_widget, "draw-links", TRUE, NULL);
int number_of_links = 0;
g_object_get(page_widget, "number-of-links", &number_of_links, NULL);
if (number_of_links != 0) {
show_links = true;
}
g_object_set(page_widget, "offset-links", page_offset, NULL);
page_offset += number_of_links;
} else {
g_object_set(page_widget, "draw-links", FALSE, NULL);
}
}
return show_links;
}
bool bool
sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -38,7 +71,7 @@ sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument),
} }
g_object_set(zathura_page_get_widget(zathura, page), "draw-links", FALSE, NULL); g_object_set(zathura_page_get_widget(zathura, page), "draw-links", FALSE, NULL);
if (clear_search) { if (clear_search == true) {
g_object_set(zathura_page_get_widget(zathura, page), "search-results", NULL, NULL); g_object_set(zathura_page_get_widget(zathura, page), "search-results", NULL, NULL);
} }
} }
@ -52,7 +85,7 @@ sc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument),
bool bool
sc_adjust_window(girara_session_t* session, girara_argument_t* argument, sc_adjust_window(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -65,6 +98,9 @@ sc_adjust_window(girara_session_t* session, girara_argument_t* argument,
unsigned int first_page_column = 1; unsigned int first_page_column = 1;
girara_setting_get(session, "first-page-column", &first_page_column); girara_setting_get(session, "first-page-column", &first_page_column);
int padding = 1;
girara_setting_get(zathura->ui.session, "page-padding", &padding);
if (zathura->ui.page_widget == NULL || zathura->document == NULL) { if (zathura->ui.page_widget == NULL || zathura->document == NULL) {
goto error_ret; goto error_ret;
} }
@ -79,8 +115,8 @@ sc_adjust_window(girara_session_t* session, girara_argument_t* argument,
/* get window size */ /* get window size */
GtkAllocation allocation; GtkAllocation allocation;
gtk_widget_get_allocation(session->gtk.view, &allocation); gtk_widget_get_allocation(session->gtk.view, &allocation);
double width = allocation.width; unsigned int width = allocation.width;
double height = allocation.height; unsigned int height = allocation.height;
/* scrollbar spacing */ /* scrollbar spacing */
gint spacing; gint spacing;
@ -90,75 +126,58 @@ sc_adjust_window(girara_session_t* session, girara_argument_t* argument,
/* correct view size */ /* correct view size */
if (gtk_widget_get_visible(GTK_WIDGET(session->gtk.inputbar)) == true) { if (gtk_widget_get_visible(GTK_WIDGET(session->gtk.inputbar)) == true) {
gtk_widget_get_allocation(session->gtk.inputbar, &allocation); gtk_widget_get_allocation(session->gtk.inputbar, &allocation);
width += allocation.width;
height += allocation.height; height += allocation.height;
} }
/* calculate total width and max-height */ double scale = 1.0;
double total_width = 0; unsigned int cell_height = 0, cell_width = 0;
double total_height = 0; unsigned int document_height = 0, document_width = 0;
double max_height = 0;
double max_width = 0;
unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document); zathura_document_set_scale(zathura->document, scale);
for (unsigned int page_id = 0; page_id < pages_per_row; page_id++) { zathura_document_get_cell_size(zathura->document, &cell_height, &cell_width);
if (page_id == number_of_pages) { zathura_get_document_size(zathura, cell_height, cell_width,
break; &document_height, &document_width);
}
zathura_page_t* page = zathura_document_get_page(zathura->document, page_id); double page_ratio = (double)cell_height / (double)document_width;
if (page == NULL) { double window_ratio = (double)height / (double)width;
goto error_ret;
}
unsigned int page_height = zathura_page_get_height(page); if (argument->n == ZATHURA_ADJUST_WIDTH ||
unsigned int page_width = zathura_page_get_width(page); (argument->n == ZATHURA_ADJUST_BESTFIT && page_ratio < window_ratio)) {
scale = (double)(width - (pages_per_row - 1) * padding) /
(double)(pages_per_row * cell_width);
zathura_document_set_scale(zathura->document, scale);
if (page_height > max_height) { bool show_scrollbars = false;
max_height = page_height; girara_setting_get(session, "show-scrollbars", &show_scrollbars);
}
if (page_width > max_width) { if (show_scrollbars) {
max_width = page_width; /* If the document is taller than the view, there's a vertical
} * scrollbar; we need to substract its width from the view's width. */
zathura_get_document_size(zathura, cell_height, cell_width,
&document_height, &document_width);
if (height < document_height) {
GtkWidget* vscrollbar = gtk_scrolled_window_get_vscrollbar(
GTK_SCROLLED_WINDOW(session->gtk.view));
total_width += page_width; if (vscrollbar != NULL) {
total_height += page_height; GtkRequisition requisition;
} gtk_widget_get_requisition(vscrollbar, &requisition);
if (0 < requisition.width && (unsigned)requisition.width < width) {
unsigned int rotation = zathura_document_get_rotation(zathura->document); width -= requisition.width;
double page_ratio = max_height / total_width; scale = (double)(width - (pages_per_row - 1) * padding) /
double window_ratio = height / width; (double)(pages_per_row * cell_width);
zathura_document_set_scale(zathura->document, scale);
if (rotation == 90 || rotation == 270) { }
page_ratio = max_width / total_height;
}
switch (argument->n) {
case ZATHURA_ADJUST_WIDTH:
if (rotation == 0 || rotation == 180) {
zathura_document_set_scale(zathura->document, width / total_width);
} else {
zathura_document_set_scale(zathura->document, width / total_height);
}
break;
case ZATHURA_ADJUST_BESTFIT:
if (rotation == 0 || rotation == 180) {
if (page_ratio < window_ratio) {
zathura_document_set_scale(zathura->document, width / total_width);
} else {
zathura_document_set_scale(zathura->document, height / max_height);
}
} else {
if (page_ratio < window_ratio) {
zathura_document_set_scale(zathura->document, width / total_height);
} else {
zathura_document_set_scale(zathura->document, height / max_width);
} }
} }
break; }
default: }
goto error_ret; else if (argument->n == ZATHURA_ADJUST_BESTFIT) {
scale = (double)height / (double)cell_height;
zathura_document_set_scale(zathura->document, scale);
}
else {
goto error_ret;
} }
/* keep position */ /* keep position */
@ -174,7 +193,7 @@ error_ret:
bool bool
sc_change_mode(girara_session_t* session, girara_argument_t* argument, sc_change_mode(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
@ -183,6 +202,30 @@ sc_change_mode(girara_session_t* session, girara_argument_t* argument,
return false; return false;
} }
bool
sc_display_link(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->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL || zathura->ui.session == NULL) {
return false;
}
bool show_links = draw_links(zathura);
/* ask for input */
if (show_links) {
girara_dialog(zathura->ui.session, "Display link:", FALSE, NULL,
(girara_callback_inputbar_activate_t) cb_sc_display_link,
zathura->ui.session);
}
return false;
}
bool bool
sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument, girara_event_t* UNUSED(event), unsigned int UNUSED(t)) sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument, girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
@ -239,7 +282,7 @@ sc_focus_inputbar(girara_session_t* session, girara_argument_t* argument, girara
bool bool
sc_follow(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_follow(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -249,32 +292,7 @@ sc_follow(girara_session_t* session, girara_argument_t* UNUSED(argument),
return false; return false;
} }
/* set pages to draw links */ bool show_links = draw_links(zathura);
bool show_links = false;
unsigned int page_offset = 0;
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;
}
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
g_object_set(page_widget, "search-results", NULL, NULL);
if (zathura_page_get_visibility(page) == true) {
g_object_set(page_widget, "draw-links", TRUE, NULL);
int number_of_links = 0;
g_object_get(page_widget, "number-of-links", &number_of_links, NULL);
if (number_of_links != 0) {
show_links = true;
}
g_object_set(page_widget, "offset-links", page_offset, NULL);
page_offset += number_of_links;
} else {
g_object_set(page_widget, "draw-links", FALSE, NULL);
}
}
/* ask for input */ /* ask for input */
if (show_links == true) { if (show_links == true) {
@ -293,6 +311,7 @@ sc_goto(girara_session_t* session, girara_argument_t* argument, girara_event_t*
g_return_val_if_fail(argument != NULL, false); g_return_val_if_fail(argument != NULL, false);
g_return_val_if_fail(zathura->document != NULL, false); g_return_val_if_fail(zathura->document != NULL, false);
zathura_jumplist_save(zathura);
if (t != 0) { if (t != 0) {
/* add offset */ /* add offset */
unsigned int page_offset = zathura_document_get_page_offset(zathura->document); unsigned int page_offset = zathura_document_get_page_offset(zathura->document);
@ -300,13 +319,15 @@ sc_goto(girara_session_t* session, girara_argument_t* argument, girara_event_t*
t += page_offset; t += page_offset;
} }
page_set(zathura, t - 1); page_set(zathura, t-1);
} else if (argument->n == TOP) { } else if (argument->n == TOP) {
page_set(zathura, 0); page_set(zathura, 0);
} else if (argument->n == BOTTOM) { } else if (argument->n == BOTTOM) {
page_set(zathura, zathura_document_get_number_of_pages(zathura->document) - 1); page_set(zathura, zathura_document_get_number_of_pages(zathura->document) - 1);
} }
zathura_jumplist_add(zathura);
return false; return false;
} }
@ -330,14 +351,14 @@ sc_mouse_scroll(girara_session_t* session, girara_argument_t* argument, girara_e
GtkAdjustment* y_adj = NULL; GtkAdjustment* y_adj = NULL;
switch (event->type) { switch (event->type) {
/* scroll */ /* scroll */
case GIRARA_EVENT_SCROLL_UP: case GIRARA_EVENT_SCROLL_UP:
case GIRARA_EVENT_SCROLL_DOWN: case GIRARA_EVENT_SCROLL_DOWN:
case GIRARA_EVENT_SCROLL_LEFT: case GIRARA_EVENT_SCROLL_LEFT:
case GIRARA_EVENT_SCROLL_RIGHT: case GIRARA_EVENT_SCROLL_RIGHT:
return sc_scroll(session, argument, NULL, t); return sc_scroll(session, argument, NULL, t);
/* drag */ /* drag */
case GIRARA_EVENT_BUTTON_PRESS: case GIRARA_EVENT_BUTTON_PRESS:
x = event->x; x = event->x;
y = event->y; y = event->y;
@ -358,7 +379,7 @@ sc_mouse_scroll(girara_session_t* session, girara_argument_t* argument, girara_e
set_adjustment(y_adj, gtk_adjustment_get_value(y_adj) - (event->y - y)); set_adjustment(y_adj, gtk_adjustment_get_value(y_adj) - (event->y - y));
break; break;
/* unhandled events */ /* unhandled events */
default: default:
break; break;
} }
@ -396,7 +417,7 @@ sc_mouse_zoom(girara_session_t* session, girara_argument_t* argument, girara_eve
bool bool
sc_navigate(girara_session_t* session, girara_argument_t* argument, sc_navigate(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int t) girara_event_t* UNUSED(event), unsigned int t)
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -420,20 +441,20 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument,
t = (t == 0) ? (unsigned int) offset : t; t = (t == 0) ? (unsigned int) offset : t;
if (argument->n == NEXT) { if (argument->n == NEXT) {
if (scroll_wrap == true) { if (scroll_wrap == false) {
new_page = new_page + t; new_page = new_page + t;
} else { } else {
new_page = (new_page + t) % number_of_pages; new_page = (new_page + t) % number_of_pages;
} }
} else if (argument->n == PREVIOUS) { } else if (argument->n == PREVIOUS) {
if (scroll_wrap == true) { if (scroll_wrap == false) {
new_page = new_page - t; new_page = new_page - t;
} else { } else {
new_page = (new_page + number_of_pages - t) % number_of_pages; new_page = (new_page + number_of_pages - t) % number_of_pages;
} }
} }
if (scroll_wrap == true && (new_page < 0 || new_page >= number_of_pages)) { if ((new_page < 0 || new_page >= number_of_pages) && !scroll_wrap) {
return false; return false;
} }
@ -444,7 +465,7 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument,
bool bool
sc_print(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_print(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -462,7 +483,7 @@ sc_print(girara_session_t* session, girara_argument_t* UNUSED(argument),
bool bool
sc_recolor(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_recolor(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
@ -476,7 +497,7 @@ sc_recolor(girara_session_t* session, girara_argument_t* UNUSED(argument),
bool bool
sc_reload(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_reload(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -497,7 +518,7 @@ sc_reload(girara_session_t* session, girara_argument_t* UNUSED(argument),
bool bool
sc_rotate(girara_session_t* session, girara_argument_t* argument, sc_rotate(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int t) girara_event_t* UNUSED(event), unsigned int t)
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -530,7 +551,7 @@ sc_rotate(girara_session_t* session, girara_argument_t* argument,
bool bool
sc_scroll(girara_session_t* session, girara_argument_t* argument, sc_scroll(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -542,7 +563,7 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument,
GtkAdjustment* adjustment = NULL; GtkAdjustment* adjustment = NULL;
if ( (argument->n == LEFT) || (argument->n == FULL_LEFT) || (argument->n == HALF_LEFT) || if ( (argument->n == LEFT) || (argument->n == FULL_LEFT) || (argument->n == HALF_LEFT) ||
(argument->n == RIGHT) || (argument->n == FULL_RIGHT) || (argument->n == HALF_RIGHT)) { (argument->n == RIGHT) || (argument->n == FULL_RIGHT) || (argument->n == HALF_RIGHT)) {
adjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view)); adjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
} else { } else {
adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(session->gtk.view)); adjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(session->gtk.view));
@ -560,6 +581,14 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument,
if (scroll_hstep < 0) { if (scroll_hstep < 0) {
scroll_hstep = scroll_step; scroll_hstep = scroll_step;
} }
float scroll_full_overlap = 0.0;
girara_setting_get(session, "scroll-full-overlap", &scroll_full_overlap);
bool scroll_page_aware = false;
girara_setting_get(session, "scroll-page-aware", &scroll_page_aware);
bool scroll_wrap = false;
girara_setting_get(session, "scroll-wrap", &scroll_wrap);
int padding = 1; int padding = 1;
girara_setting_get(session, "page-padding", &padding); girara_setting_get(session, "page-padding", &padding);
@ -568,11 +597,11 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument,
switch(argument->n) { switch(argument->n) {
case FULL_UP: case FULL_UP:
case FULL_LEFT: case FULL_LEFT:
new_value = value - view_size - padding; new_value = value - (1.0 - scroll_full_overlap) * view_size - padding;
break; break;
case FULL_DOWN: case FULL_DOWN:
case FULL_RIGHT: case FULL_RIGHT:
new_value = value + view_size + padding; new_value = value + (1.0 - scroll_full_overlap) * view_size + padding;
break; break;
case HALF_UP: case HALF_UP:
case HALF_LEFT: case HALF_LEFT:
@ -604,14 +633,107 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument,
new_value = value; new_value = value;
} }
if (scroll_wrap == true) {
if (new_value < 0)
new_value = max;
else if (new_value > max)
new_value = 0;
}
if (scroll_page_aware == true) {
int page_offset;
double page_size;
{
unsigned int page_id = zathura_document_get_current_page_number(zathura->document);
zathura_page_t* page = zathura_document_get_page(zathura->document, page_id);
page_offset_t offset;
page_calculate_offset(zathura, page, &offset);
double scale = zathura_document_get_scale(zathura->document);
if ((argument->n == LEFT) || (argument->n == FULL_LEFT) || (argument->n == HALF_LEFT) ||
(argument->n == RIGHT) || (argument->n == FULL_RIGHT) || (argument->n == HALF_RIGHT)) {
page_offset = offset.x;
page_size = zathura_page_get_width(page) * scale;
} else {
page_offset = offset.y;
page_size = zathura_page_get_height(page) * scale;
}
page_offset -= padding / 2;
page_size += padding;
}
if ((argument->n == FULL_DOWN) || (argument->n == HALF_DOWN) ||
(argument->n == FULL_RIGHT) || (argument->n == HALF_RIGHT)) {
if ((page_offset > value) &&
(page_offset < value + view_size)) {
new_value = page_offset;
} else if ((page_offset <= value) &&
(page_offset + page_size < value + view_size)) {
new_value = page_offset + page_size + 1;
} else if ((page_offset <= value) &&
(page_offset + page_size < new_value + view_size)) {
new_value = page_offset + page_size - view_size + 1;
}
} else if ((argument->n == FULL_UP) || (argument->n == HALF_UP) ||
(argument->n == FULL_LEFT) || (argument->n == HALF_LEFT)) {
if ((page_offset + 1 >= value) &&
(page_offset < value + view_size)) {
new_value = page_offset - view_size;
} else if ((page_offset <= value) &&
(page_offset + page_size + 1 < value + view_size)) {
new_value = page_offset + page_size - view_size;
} else if ((page_offset <= value) &&
(page_offset > new_value)) {
new_value = page_offset;
}
}
}
set_adjustment(adjustment, new_value); set_adjustment(adjustment, new_value);
return false; return false;
} }
bool
sc_jumplist(girara_session_t* session, girara_argument_t* argument, girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
zathura_t* zathura = session->global.data;
g_return_val_if_fail(argument != NULL, false);
g_return_val_if_fail(zathura->document != NULL, false);
zathura_jump_t* jump = NULL;
switch(argument->n) {
case FORWARD:
zathura_jumplist_save(zathura);
zathura_jumplist_forward(zathura);
jump = zathura_jumplist_current(zathura);
break;
case BACKWARD:
zathura_jumplist_save(zathura);
zathura_jumplist_backward(zathura);
jump = zathura_jumplist_current(zathura);
break;
}
if (jump != NULL) {
page_set(zathura, jump->page);
const double s = zathura_document_get_scale(zathura->document);
position_set_delayed(zathura, jump->x * s, jump->y * s);
}
return false;
}
bool bool
sc_search(girara_session_t* session, girara_argument_t* argument, sc_search(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -621,7 +743,10 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
const int num_pages = zathura_document_get_number_of_pages(zathura->document); const int num_pages = zathura_document_get_number_of_pages(zathura->document);
const int cur_page = zathura_document_get_current_page_number(zathura->document); const int cur_page = zathura_document_get_current_page_number(zathura->document);
int diff = argument->n == FORWARD ? 1 : -1; int diff = argument->n == FORWARD ? 1 : -1;
if (zathura->global.search_direction == BACKWARD)
diff = -diff;
zathura_page_t* target_page = NULL; zathura_page_t* target_page = NULL;
int target_idx = 0; int target_idx = 0;
@ -637,7 +762,7 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
int num_search_results = 0, current = -1; int num_search_results = 0, current = -1;
g_object_get(page_widget, "search-current", &current, g_object_get(page_widget, "search-current", &current,
"search-length", &num_search_results, NULL); "search-length", &num_search_results, NULL);
if (num_search_results == 0 || current == -1) { if (num_search_results == 0 || current == -1) {
continue; continue;
} }
@ -651,6 +776,8 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
target_idx = current - 1; target_idx = current - 1;
} else { } else {
/* the next result is on a different page */ /* the next result is on a different page */
zathura_jumplist_save(zathura);
g_object_set(page_widget, "search-current", -1, NULL); g_object_set(page_widget, "search-current", -1, NULL);
for (int npage_id = 1; page_id < num_pages; ++npage_id) { for (int npage_id = 1; page_id < num_pages; ++npage_id) {
@ -665,6 +792,8 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
break; break;
} }
} }
zathura_jumplist_add(zathura);
} }
break; break;
@ -699,7 +828,7 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
bool bool
sc_navigate_index(girara_session_t* session, girara_argument_t* argument, sc_navigate_index(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -736,7 +865,7 @@ sc_navigate_index(girara_session_t* session, girara_argument_t* argument,
gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get_iter(model, &iter, path);
/* select last child */ /* select last child */
gtk_tree_model_iter_nth_child(model, &child_iter, &iter, gtk_tree_model_iter_nth_child(model, &child_iter, &iter,
gtk_tree_model_iter_n_children(model, &iter)-1); gtk_tree_model_iter_n_children(model, &iter)-1);
gtk_tree_path_free(path); gtk_tree_path_free(path);
path = gtk_tree_model_get_path(model, &child_iter); path = gtk_tree_model_get_path(model, &child_iter);
} }
@ -744,7 +873,7 @@ sc_navigate_index(girara_session_t* session, girara_argument_t* argument,
break; break;
case COLLAPSE: case COLLAPSE:
if (gtk_tree_view_collapse_row(tree_view, path) == FALSE if (gtk_tree_view_collapse_row(tree_view, path) == FALSE
&& gtk_tree_path_get_depth(path) > 1) { && gtk_tree_path_get_depth(path) > 1) {
gtk_tree_path_up(path); gtk_tree_path_up(path);
gtk_tree_view_collapse_row(tree_view, path); gtk_tree_view_collapse_row(tree_view, path);
} }
@ -756,11 +885,12 @@ sc_navigate_index(girara_session_t* session, girara_argument_t* argument,
do { do {
gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get_iter(model, &iter, path);
if (gtk_tree_model_iter_next(model, &iter)) { if (gtk_tree_model_iter_next(model, &iter)) {
gtk_tree_path_free(path);
path = gtk_tree_model_get_path(model, &iter); path = gtk_tree_model_get_path(model, &iter);
break; break;
} }
} while((is_valid_path = (gtk_tree_path_get_depth(path) > 1)) } while((is_valid_path = (gtk_tree_path_get_depth(path) > 1))
&& gtk_tree_path_up(path)); && gtk_tree_path_up(path));
} }
break; break;
case EXPAND: case EXPAND:
@ -779,6 +909,7 @@ sc_navigate_index(girara_session_t* session, girara_argument_t* argument,
break; break;
case SELECT: case SELECT:
cb_index_row_activated(tree_view, path, NULL, zathura); cb_index_row_activated(tree_view, path, NULL, zathura);
gtk_tree_path_free(path);
return false; return false;
} }
@ -793,7 +924,7 @@ sc_navigate_index(girara_session_t* session, girara_argument_t* argument,
bool bool
sc_toggle_index(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_toggle_index(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -817,7 +948,7 @@ sc_toggle_index(girara_session_t* session, girara_argument_t* UNUSED(argument),
} }
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(zathura->ui.index), gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(zathura->ui.index),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
/* create index */ /* create index */
document_index = zathura_document_index_generate(zathura->document, NULL); document_index = zathura_document_index_generate(zathura->document, NULL);
@ -884,6 +1015,9 @@ sc_toggle_index(girara_session_t* session, girara_argument_t* UNUSED(argument),
vvalue = gtk_adjustment_get_value(vadjustment); vvalue = gtk_adjustment_get_value(vadjustment);
hvalue = gtk_adjustment_get_value(hadjustment); hvalue = gtk_adjustment_get_value(hadjustment);
/* save current position to the jumplist */
zathura_jumplist_save(zathura);
girara_set_view(session, zathura->ui.index); girara_set_view(session, zathura->ui.index);
gtk_widget_show(GTK_WIDGET(zathura->ui.index)); gtk_widget_show(GTK_WIDGET(zathura->ui.index));
girara_mode_set(zathura->ui.session, zathura->modes.index); girara_mode_set(zathura->ui.session, zathura->modes.index);
@ -907,9 +1041,38 @@ error_ret:
return false; return false;
} }
bool
sc_toggle_page_mode(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->global.data != NULL, false);
zathura_t* zathura = session->global.data;
if (zathura->document == NULL) {
girara_notify(session, GIRARA_WARNING, _("No document opened."));
return false;
}
int pages_per_row = 1;
girara_setting_get(zathura->ui.session, "pages-per-row", &pages_per_row);
static int tmp = 2;
int value = 1;
if (pages_per_row == 1) {
value = tmp;
} else {
tmp = pages_per_row;
}
girara_setting_set(zathura->ui.session, "pages-per-row", &value);
return true;
}
bool bool
sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* sc_toggle_fullscreen(girara_session_t* session, girara_argument_t*
UNUSED(argument), girara_event_t* UNUSED(event), unsigned int UNUSED(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 != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);
@ -942,6 +1105,9 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t*
zathura_document_set_scale(zathura->document, zoom); zathura_document_set_scale(zathura->document, zoom);
render_all(zathura); render_all(zathura);
page_set_delayed(zathura, zathura_document_get_current_page_number(zathura->document)); page_set_delayed(zathura, zathura_document_get_current_page_number(zathura->document));
/* setm ode */
girara_mode_set(session, zathura->modes.normal);
} else { } else {
/* backup pages per row */ /* backup pages per row */
girara_setting_get(session, "pages-per-row", &pages_per_row); girara_setting_get(session, "pages-per-row", &pages_per_row);
@ -967,6 +1133,9 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t*
/* set full screen */ /* set full screen */
gtk_window_fullscreen(GTK_WINDOW(session->gtk.window)); gtk_window_fullscreen(GTK_WINDOW(session->gtk.window));
page_set_delayed(zathura, zathura_document_get_current_page_number(zathura->document)); page_set_delayed(zathura, zathura_document_get_current_page_number(zathura->document));
/* setm ode */
girara_mode_set(session, zathura->modes.fullscreen);
} }
fullscreen = fullscreen ? false : true; fullscreen = fullscreen ? false : true;
@ -976,7 +1145,7 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t*
bool bool
sc_quit(girara_session_t* session, girara_argument_t* UNUSED(argument), sc_quit(girara_session_t* session, girara_argument_t* UNUSED(argument),
girara_event_t* UNUSED(event), unsigned int UNUSED(t)) girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
@ -990,7 +1159,7 @@ sc_quit(girara_session_t* session, girara_argument_t* UNUSED(argument),
bool bool
sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t* sc_zoom(girara_session_t* session, girara_argument_t* argument, girara_event_t*
UNUSED(event), unsigned int t) UNUSED(event), unsigned int t)
{ {
g_return_val_if_fail(session != NULL, false); g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false); g_return_val_if_fail(session->global.data != NULL, false);

View file

@ -38,6 +38,17 @@ bool sc_adjust_window(girara_session_t* session, girara_argument_t* argument, gi
*/ */
bool sc_change_mode(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t); bool sc_change_mode(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
/**
* Display a link
*
* @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 occured otherwise false
*/
bool sc_display_link(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
/** /**
* Shortcut function to focus the inputbar * Shortcut function to focus the inputbar
* *
@ -160,6 +171,17 @@ bool sc_rotate(girara_session_t* session, girara_argument_t* argument, girara_ev
*/ */
bool sc_scroll(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t); bool sc_scroll(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
/**
* Scroll through the pages
*
* @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 occured otherwise false
*/
bool sc_jumplist(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
/** /**
* Search through the document for the latest search item * Search through the document for the latest search item
* *
@ -193,6 +215,17 @@ bool sc_navigate_index(girara_session_t* session, girara_argument_t* argument, g
*/ */
bool sc_toggle_index(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t); bool sc_toggle_index(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
/**
* Toggle multi page mode
*
* @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 occured otherwise false
*/
bool sc_toggle_page_mode(girara_session_t* session, girara_argument_t* argument, girara_event_t* event, unsigned int t);
/** /**
* Toggle fullscreen mode * Toggle fullscreen mode
* *

223
synctex.c
View file

@ -1,25 +1,80 @@
/* See LICENSE file for license and copyright information */ /* See LICENSE file for license and copyright information */
#include <glib.h>
#include <glib/gi18n.h>
#include "synctex.h" #include "synctex.h"
#include "zathura.h" #include "zathura.h"
#include "page.h" #include "page.h"
#include "document.h" #include "document.h"
#include "utils.h"
#include <glib.h> #include <girara/session.h>
enum {
SYNCTEX_RESULT_BEGIN = 1,
SYNCTEX_RESULT_END,
SYNCTEX_PROP_PAGE,
SYNCTEX_PROP_H,
SYNCTEX_PROP_V,
SYNCTEX_PROP_WIDTH,
SYNCTEX_PROP_HEIGHT,
};
typedef struct token_s {
const char* name;
guint token;
} token_t;
static token_t scanner_tokens[] = {
{"SyncTeX result begin", SYNCTEX_RESULT_BEGIN},
{"SyncTeX result end", SYNCTEX_RESULT_END},
{"Page:", SYNCTEX_PROP_PAGE},
{"h:", SYNCTEX_PROP_H},
{"v:", SYNCTEX_PROP_V},
{"W:", SYNCTEX_PROP_WIDTH},
{"H:", SYNCTEX_PROP_HEIGHT},
{NULL, 0}
};
static GScannerConfig scanner_config = {
.cset_skip_characters = "\n\r",
.cset_identifier_first = G_CSET_a_2_z G_CSET_A_2_Z,
.cset_identifier_nth = G_CSET_a_2_z G_CSET_A_2_Z ": ",
.cpair_comment_single = NULL,
.case_sensitive = TRUE,
.scan_identifier = TRUE,
.scan_symbols = TRUE,
.scan_float = TRUE,
.numbers_2_int = TRUE,
};
static void synctex_record_hits(zathura_t* zathura, int page_idx, girara_list_t* hits, bool first);
static double scan_float(GScanner* scanner);
static bool synctex_view(zathura_t* zathura, char* position);
void void
synctex_edit(zathura_t* zathura, zathura_page_t* page, int x, int y) synctex_edit(zathura_t* zathura, zathura_page_t* page, int x, int y)
{ {
zathura_document_t* doc = zathura_page_get_document(page); if (zathura == NULL || page == NULL) {
const char *filename = zathura_document_get_path(doc);
int pageIdx = zathura_page_get_index(page);
char *buffer = g_strdup_printf("%d:%d:%d:%s", pageIdx+1, x, y, filename);
if (buffer == NULL)
return; return;
}
if (zathura->synctex.editor) { zathura_document_t* document = zathura_page_get_document(page);
if (document == NULL) {
return;
}
const char *filename = zathura_document_get_path(document);
if (filename == NULL) {
return;
}
int page_idx = zathura_page_get_index(page);
char *buffer = g_strdup_printf("%d:%d:%d:%s", page_idx + 1, x, y, filename);
if (zathura->synctex.editor != NULL) {
char* argv[] = {"synctex", "edit", "-o", buffer, "-x", zathura->synctex.editor, NULL}; char* argv[] = {"synctex", "edit", "-o", buffer, "-x", zathura->synctex.editor, NULL};
g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL); g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL);
} else { } else {
@ -29,3 +84,155 @@ synctex_edit(zathura_t* zathura, zathura_page_t* page, int x, int y)
g_free(buffer); g_free(buffer);
} }
static void
synctex_record_hits(zathura_t* zathura, int page_idx, girara_list_t* hits, bool first)
{
zathura_page_t* page = zathura_document_get_page(zathura->document, page_idx-1);
if (page == NULL)
return;
GtkWidget* page_widget = zathura_page_get_widget(zathura, page);
g_object_set(page_widget, "draw-links", FALSE, NULL);
g_object_set(page_widget, "search-results", hits, NULL);
if (first) {
page_set_delayed(zathura, zathura_page_get_index(page));
g_object_set(page_widget, "search-current", 0, NULL);
}
}
static double
scan_float(GScanner* scanner)
{
switch (g_scanner_get_next_token(scanner)) {
case G_TOKEN_FLOAT:
return g_scanner_cur_value(scanner).v_float;
case G_TOKEN_INT:
return g_scanner_cur_value(scanner).v_int;
default:
return 0.0;
}
}
static bool
synctex_view(zathura_t* zathura, char* position)
{
char* filename = g_strdup(zathura_document_get_path(zathura->document));
char* argv[] = {"synctex", "view", "-i", position, "-o", filename, NULL};
gint output;
bool ret = g_spawn_async_with_pipes(NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_STDERR_TO_DEV_NULL, NULL, NULL, NULL, NULL, &output, NULL, NULL);
g_free(filename);
if (ret == false) {
return false;
}
GScanner* scanner = g_scanner_new(&scanner_config);
token_t* tokens = scanner_tokens;
while (tokens->name != NULL) {
g_scanner_add_symbol(scanner, tokens->name, GINT_TO_POINTER(tokens->token));
tokens++;
}
g_scanner_input_file(scanner, output);
bool found_begin = false, found_end = false;
while (found_begin == false && found_end == false) {
switch (g_scanner_get_next_token(scanner)) {
case G_TOKEN_EOF:
found_end = true;
break;
case G_TOKEN_SYMBOL:
switch (GPOINTER_TO_INT(g_scanner_cur_value(scanner).v_identifier)) {
case SYNCTEX_RESULT_BEGIN:
found_begin = true;
break;
}
break;
default:
/* skip everything else */
break;
}
}
if (found_begin == 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) {
continue;
}
g_object_set(zathura_page_get_widget(zathura, page), "search-results", NULL, NULL);
}
}
ret = false;
int page = -1, nextpage;
girara_list_t* hitlist = NULL;
zathura_rectangle_t* rectangle = NULL;
while (found_end == false) {
switch (g_scanner_get_next_token(scanner)) {
case G_TOKEN_EOF:
found_end = true;
break;
case G_TOKEN_SYMBOL:
switch (GPOINTER_TO_INT(g_scanner_cur_value(scanner).v_identifier)) {
case SYNCTEX_RESULT_END:
found_end = true;
break;
case SYNCTEX_PROP_PAGE:
if (g_scanner_get_next_token(scanner) == G_TOKEN_INT) {
nextpage = g_scanner_cur_value(scanner).v_int;
if (page != nextpage) {
if (hitlist) {
synctex_record_hits(zathura, page, hitlist, !ret);
ret = true;
}
hitlist = girara_list_new2((girara_free_function_t) g_free);
page = nextpage;
}
rectangle = g_malloc0(sizeof(zathura_rectangle_t));
girara_list_append(hitlist, rectangle);
}
break;
case SYNCTEX_PROP_H:
rectangle->x1 = scan_float(scanner);
break;
case SYNCTEX_PROP_V:
rectangle->y2 = scan_float(scanner);
break;
case SYNCTEX_PROP_WIDTH:
rectangle->x2 = rectangle->x1 + scan_float(scanner);
break;
case SYNCTEX_PROP_HEIGHT:
rectangle->y1 = rectangle->y2 - scan_float(scanner);
break;
}
break;
default:
break;
}
}
if (hitlist != NULL) {
synctex_record_hits(zathura, page, hitlist, !ret);
ret = true;
}
g_scanner_destroy(scanner);
close(output);
return ret;
}

View file

@ -72,14 +72,14 @@ girara_list_t*
zathura_document_information_entry_list_new() zathura_document_information_entry_list_new()
{ {
girara_list_t* list = girara_list_new2((girara_free_function_t) girara_list_t* list = girara_list_new2((girara_free_function_t)
zathura_document_information_entry_free); zathura_document_information_entry_free);
return list; return list;
} }
zathura_document_information_entry_t* zathura_document_information_entry_t*
zathura_document_information_entry_new(zathura_document_information_type_t type, zathura_document_information_entry_new(zathura_document_information_type_t type,
const char* value) const char* value)
{ {
if (value == NULL) { if (value == NULL) {
return NULL; return NULL;

116
utils.c
View file

@ -34,8 +34,7 @@ file_get_extension(const char* path)
} }
unsigned int i = strlen(path); unsigned int i = strlen(path);
for (; i > 0; i--) for (; i > 0; i--) {
{
if (*(path + i) != '.') { if (*(path + i) != '.') {
continue; continue;
} else { } else {
@ -146,31 +145,31 @@ execute_command(char* const argv[], char** output)
void void
document_index_build(GtkTreeModel* model, GtkTreeIter* parent, document_index_build(GtkTreeModel* model, GtkTreeIter* parent,
girara_tree_node_t* tree) girara_tree_node_t* tree)
{ {
girara_list_t* list = girara_node_get_children(tree); girara_list_t* list = girara_node_get_children(tree);
GIRARA_LIST_FOREACH(list, girara_tree_node_t*, iter, node) GIRARA_LIST_FOREACH(list, girara_tree_node_t*, iter, node)
zathura_index_element_t* index_element = (zathura_index_element_t*)girara_node_get_data(node); zathura_index_element_t* index_element = (zathura_index_element_t*)girara_node_get_data(node);
zathura_link_type_t type = zathura_link_get_type(index_element->link); zathura_link_type_t type = zathura_link_get_type(index_element->link);
zathura_link_target_t target = zathura_link_get_target(index_element->link); zathura_link_target_t target = zathura_link_get_target(index_element->link);
gchar* description = NULL; gchar* description = NULL;
if (type == ZATHURA_LINK_GOTO_DEST) { if (type == ZATHURA_LINK_GOTO_DEST) {
description = g_strdup_printf("Page %d", target.page_number + 1); description = g_strdup_printf("Page %d", target.page_number + 1);
} else { } else {
description = g_strdup(target.value); description = g_strdup(target.value);
} }
GtkTreeIter tree_iter; GtkTreeIter tree_iter;
gtk_tree_store_append(GTK_TREE_STORE(model), &tree_iter, parent); gtk_tree_store_append(GTK_TREE_STORE(model), &tree_iter, parent);
gtk_tree_store_set(GTK_TREE_STORE(model), &tree_iter, 0, index_element->title, 1, description, 2, index_element, -1); gtk_tree_store_set(GTK_TREE_STORE(model), &tree_iter, 0, index_element->title, 1, description, 2, index_element, -1);
g_object_weak_ref(G_OBJECT(model), (GWeakNotify) zathura_index_element_free, index_element); g_object_weak_ref(G_OBJECT(model), (GWeakNotify) zathura_index_element_free, index_element);
g_free(description); g_free(description);
if (girara_node_get_num_children(node) > 0) { if (girara_node_get_num_children(node) > 0) {
document_index_build(model, &tree_iter, node); document_index_build(model, &tree_iter, node);
} }
GIRARA_LIST_FOREACH_END(list, gchar*, iter, name); GIRARA_LIST_FOREACH_END(list, gchar*, iter, name);
} }
@ -183,7 +182,7 @@ page_calculate_offset(zathura_t* zathura, zathura_page_t* page, page_offset_t* o
GtkWidget* widget = zathura_page_get_widget(zathura, page); GtkWidget* widget = zathura_page_get_widget(zathura, page);
g_return_if_fail(gtk_widget_translate_coordinates(widget, g_return_if_fail(gtk_widget_translate_coordinates(widget,
zathura->ui.page_widget, 0, 0, &(offset->x), &(offset->y)) == true); zathura->ui.page_widget, 0, 0, &(offset->x), &(offset->y)) == true);
} }
zathura_rectangle_t rotate_rectangle(zathura_rectangle_t rectangle, unsigned int degree, int height, int width) zathura_rectangle_t rotate_rectangle(zathura_rectangle_t rectangle, unsigned int degree, int height, int width)
@ -274,7 +273,7 @@ void
set_adjustment(GtkAdjustment* adjustment, gdouble value) set_adjustment(GtkAdjustment* adjustment, gdouble value)
{ {
gtk_adjustment_set_value(adjustment, MAX(gtk_adjustment_get_lower(adjustment), gtk_adjustment_set_value(adjustment, MAX(gtk_adjustment_get_lower(adjustment),
MIN(gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment), value))); MIN(gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment), value)));
} }
void void
@ -300,6 +299,43 @@ page_calc_height_width(zathura_page_t* page, unsigned int* page_height, unsigned
} }
} }
void
zathura_get_document_size(zathura_t* zathura,
unsigned int cell_height, unsigned int cell_width,
unsigned int* height, unsigned int* width)
{
g_return_if_fail(zathura != NULL && zathura->document != NULL &&
height != NULL && width != NULL);
unsigned int pages_per_row = 1;
girara_setting_get(zathura->ui.session, "pages-per-row", &pages_per_row);
if (pages_per_row == 0)
pages_per_row = 1;
unsigned int first_page_column = 1;
girara_setting_get(zathura->ui.session, "first-page-column", &first_page_column);
if (first_page_column < 1)
first_page_column = 1;
if (first_page_column > pages_per_row)
first_page_column = (first_page_column - 1) % pages_per_row + 1;
int padding = 1;
girara_setting_get(zathura->ui.session, "page-padding", &padding);
double scale = zathura_document_get_scale(zathura->document);
cell_height = ceil(cell_height * scale);
cell_width = ceil(cell_width * scale);
*width = pages_per_row * cell_width + (pages_per_row - 1) * padding;
unsigned int effective_number_of_pages =
zathura_document_get_number_of_pages(zathura->document) +
first_page_column - 1;
unsigned int rows = effective_number_of_pages / pages_per_row +
(effective_number_of_pages % pages_per_row ? 1 : 0);
*height = rows * cell_height + (rows - 1) * padding;
}
GtkWidget* GtkWidget*
zathura_page_get_widget(zathura_t* zathura, zathura_page_t* page) zathura_page_get_widget(zathura_t* zathura, zathura_page_t* page)
{ {
@ -357,9 +393,9 @@ document_draw_search_results(zathura_t* zathura, bool value)
char* char*
zathura_get_version_string(zathura_t* zathura, bool markup) zathura_get_version_string(zathura_t* zathura, bool markup)
{ {
if (zathura == NULL) { if (zathura == NULL) {
return NULL; return NULL;
} }
GString* string = g_string_new(NULL); GString* string = g_string_new(NULL);
@ -368,30 +404,30 @@ zathura_get_version_string(zathura_t* zathura, bool markup)
g_string_append(string, zathura_version); g_string_append(string, zathura_version);
g_free(zathura_version); g_free(zathura_version);
char* format = (markup == true) ? "\n<i>(plugin)</i> %s (%d.%d.%d) <i>(%s)</i>" : "\n(plugin) %s (%d.%d.%d) (%s)"; char* format = (markup == true) ? "\n<i>(plugin)</i> %s (%d.%d.%d) <i>(%s)</i>" : "\n(plugin) %s (%d.%d.%d) (%s)";
/* plugin information */ /* plugin information */
girara_list_t* plugins = zathura_plugin_manager_get_plugins(zathura->plugins.manager); girara_list_t* plugins = zathura_plugin_manager_get_plugins(zathura->plugins.manager);
if (plugins != NULL) { if (plugins != NULL) {
GIRARA_LIST_FOREACH(plugins, zathura_plugin_t*, iter, plugin) GIRARA_LIST_FOREACH(plugins, zathura_plugin_t*, iter, plugin)
char* name = zathura_plugin_get_name(plugin); char* name = zathura_plugin_get_name(plugin);
zathura_plugin_version_t version = zathura_plugin_get_version(plugin); zathura_plugin_version_t version = zathura_plugin_get_version(plugin);
char* text = g_strdup_printf(format, char* text = g_strdup_printf(format,
(name == NULL) ? "-" : name, (name == NULL) ? "-" : name,
version.major, version.major,
version.minor, version.minor,
version.rev, version.rev,
zathura_plugin_get_path(plugin) zathura_plugin_get_path(plugin)
); );
g_string_append(string, text); g_string_append(string, text);
g_free(text); g_free(text);
GIRARA_LIST_FOREACH_END(plugins, zathura_plugin_t*, iter, plugin); GIRARA_LIST_FOREACH_END(plugins, zathura_plugin_t*, iter, plugin);
} }
char* version = string->str; char* version = string->str;
g_string_free(string, FALSE); g_string_free(string, FALSE);
return version; return version;
} }
char* char*

17
utils.h
View file

@ -104,6 +104,23 @@ void set_adjustment(GtkAdjustment* adjust, gdouble value);
void void
page_calc_height_width(zathura_page_t* page, unsigned int* page_height, unsigned int* page_width, bool rotate); page_calc_height_width(zathura_page_t* page, unsigned int* page_height, unsigned int* page_width, bool rotate);
/**
* Compute the size of the entire document to be displayed (in pixels), taking
* 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] zathura The zathura instance
* @param[in] cell_height,cell_width The height and width of a cell containing
* a single page; it should be obtained
* using zathura_document_get_cell_size()
* with the document scale set to 1.0
* @param[out] height,width The height and width of the document
*/
void zathura_get_document_size(zathura_t* zathura,
unsigned int cell_height, unsigned int cell_width,
unsigned int* height, unsigned int* width);
/** /**
* Returns the page widget of the page * Returns the page widget of the page
* *

View file

@ -48,10 +48,10 @@ OPTIONS
Set log debug level (debug, info, warning, error) Set log debug level (debug, info, warning, error)
-s, --synctex -s, --synctex
Enable syntex support Enable synctex support
-x [cmd], --syntec-editor-command [cmd] -x [cmd], --synctex-editor-command [cmd]
Set the syntex editor command Set the synctex editor command
MOUSE AND KEY BINDINGS MOUSE AND KEY BINDINGS
====================== ======================
@ -68,6 +68,8 @@ t, ^f, ^b, space, <S-space>, y
Scroll a full page left, down, up or right Scroll a full page left, down, up or right
gg, G, nG gg, G, nG
Goto to the first, the last or to the nth page Goto to the first, the last or to the nth page
^o, ^i
Move backward and forward through the jump list
^c, Escape ^c, Escape
Abort Abort
a, s a, s
@ -80,11 +82,13 @@ o, O
Open document Open document
f f
Follow links Follow links
F
Display link target
\: \:
Enter command Enter command
r r
Rotate by 90 degrees Rotate by 90 degrees
^i ^r
Recolor Recolor
R R
Reload document Reload document
@ -169,6 +173,12 @@ The default appearance and behaviour of zathura can be overwritten by modifying
the *zathurarc* file (default path: ~/.config/zathura/zathurarc). For a detailed the *zathurarc* file (default path: ~/.config/zathura/zathurarc). For a detailed
description please consult zathurarc(5). description please consult zathurarc(5).
KNOWN BUGS
==========
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.
SEE ALSO SEE ALSO
======== ========

176
zathura.c
View file

@ -3,6 +3,7 @@
#define _BSD_SOURCE #define _BSD_SOURCE
#define _XOPEN_SOURCE 700 #define _XOPEN_SOURCE 700
#include <errno.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <math.h> #include <math.h>
@ -32,21 +33,18 @@
#include "page-widget.h" #include "page-widget.h"
#include "plugin.h" #include "plugin.h"
typedef struct zathura_document_info_s typedef struct zathura_document_info_s {
{
zathura_t* zathura; zathura_t* zathura;
const char* path; const char* path;
const char* password; const char* password;
} zathura_document_info_t; } zathura_document_info_t;
typedef struct page_set_delayed_s typedef struct page_set_delayed_s {
{
zathura_t* zathura; zathura_t* zathura;
unsigned int page; unsigned int page;
} page_set_delayed_t; } page_set_delayed_t;
typedef struct position_set_delayed_s typedef struct position_set_delayed_s {
{
zathura_t* zathura; zathura_t* zathura;
double position_x; double position_x;
double position_y; double position_y;
@ -64,6 +62,7 @@ zathura_create(void)
/* global settings */ /* global settings */
zathura->global.recolor = false; zathura->global.recolor = false;
zathura->global.update_page_number = true; zathura->global.update_page_number = true;
zathura->global.search_direction = FORWARD;
/* plugins */ /* plugins */
zathura->plugins.manager = zathura_plugin_manager_new(); zathura->plugins.manager = zathura_plugin_manager_new();
@ -95,8 +94,13 @@ zathura_init(zathura_t* zathura)
} }
/* create zathura (config/data) directory */ /* create zathura (config/data) directory */
g_mkdir_with_parents(zathura->config.config_dir, 0771); if (g_mkdir_with_parents(zathura->config.config_dir, 0771) == -1) {
g_mkdir_with_parents(zathura->config.data_dir, 0771); girara_error("Could not create '%s': %s", zathura->config.config_dir, strerror(errno));
}
if (g_mkdir_with_parents(zathura->config.data_dir, 0771) == -1) {
girara_error("Could not create '%s': %s", zathura->config.data_dir, strerror(errno));
}
/* load plugins */ /* load plugins */
zathura_plugin_manager_load(zathura->plugins.manager); zathura_plugin_manager_load(zathura->plugins.manager);
@ -208,11 +212,11 @@ zathura_init(zathura_t* zathura)
girara_setting_get(zathura->ui.session, "database", &database); girara_setting_get(zathura->ui.session, "database", &database);
if (g_strcmp0(database, "plain") == 0) { if (g_strcmp0(database, "plain") == 0) {
girara_info("Using plain database backend."); girara_debug("Using plain database backend.");
zathura->database = zathura_plaindatabase_new(zathura->config.data_dir); zathura->database = zathura_plaindatabase_new(zathura->config.data_dir);
#ifdef WITH_SQLITE #ifdef WITH_SQLITE
} else if (g_strcmp0(database, "sqlite") == 0) { } else if (g_strcmp0(database, "sqlite") == 0) {
girara_info("Using sqlite database backend."); girara_debug("Using sqlite database backend.");
char* tmp = g_build_filename(zathura->config.data_dir, "bookmarks.sqlite", NULL); char* tmp = g_build_filename(zathura->config.data_dir, "bookmarks.sqlite", NULL);
zathura->database = zathura_sqldatabase_new(tmp); zathura->database = zathura_sqldatabase_new(tmp);
g_free(tmp); g_free(tmp);
@ -228,13 +232,23 @@ zathura_init(zathura_t* zathura)
/* bookmarks */ /* bookmarks */
zathura->bookmarks.bookmarks = girara_sorted_list_new2((girara_compare_function_t) zathura_bookmarks_compare, zathura->bookmarks.bookmarks = girara_sorted_list_new2((girara_compare_function_t) zathura_bookmarks_compare,
(girara_free_function_t) zathura_bookmark_free); (girara_free_function_t) zathura_bookmark_free);
/* add even to purge old pages */ /* add even to purge old pages */
int interval = 30; int interval = 30;
girara_setting_get(zathura->ui.session, "page-store-interval", &interval); girara_setting_get(zathura->ui.session, "page-store-interval", &interval);
g_timeout_add_seconds(interval, purge_pages, zathura); g_timeout_add_seconds(interval, purge_pages, zathura);
/* jumplist */
zathura->jumplist.max_size = 20;
girara_setting_get(zathura->ui.session, "jumplist-size", &(zathura->jumplist.max_size));
zathura->jumplist.list = girara_list_new2(g_free);
zathura->jumplist.size = 0;
zathura->jumplist.cur = NULL;
zathura_jumplist_append_jump(zathura);
zathura->jumplist.cur = girara_list_iterator(zathura->jumplist.list);
return true; return true;
error_free: error_free:
@ -291,6 +305,15 @@ zathura_free(zathura_t* zathura)
g_free(zathura->config.config_dir); g_free(zathura->config.config_dir);
g_free(zathura->config.data_dir); g_free(zathura->config.data_dir);
/* free jumplist */
if (zathura->jumplist.list != NULL) {
girara_list_free(zathura->jumplist.list);
}
if (zathura->jumplist.cur != NULL) {
girara_list_iterator_free(zathura->jumplist.cur);
}
g_free(zathura); g_free(zathura);
} }
@ -343,14 +366,14 @@ zathura_set_plugin_dir(zathura_t* zathura, const char* dir)
if (dir != NULL) { if (dir != NULL) {
girara_list_t* paths = girara_split_path_array(dir); girara_list_t* paths = girara_split_path_array(dir);
GIRARA_LIST_FOREACH(paths, char*, iter, path) GIRARA_LIST_FOREACH(paths, char*, iter, path)
zathura_plugin_manager_add_dir(zathura->plugins.manager, path); zathura_plugin_manager_add_dir(zathura->plugins.manager, path);
GIRARA_LIST_FOREACH_END(paths, char*, iter, path); GIRARA_LIST_FOREACH_END(paths, char*, iter, path);
girara_list_free(paths); girara_list_free(paths);
} else { } else {
#ifdef ZATHURA_PLUGINDIR #ifdef ZATHURA_PLUGINDIR
girara_list_t* paths = girara_split_path_array(ZATHURA_PLUGINDIR); girara_list_t* paths = girara_split_path_array(ZATHURA_PLUGINDIR);
GIRARA_LIST_FOREACH(paths, char*, iter, path) GIRARA_LIST_FOREACH(paths, char*, iter, path)
zathura_plugin_manager_add_dir(zathura->plugins.manager, path); zathura_plugin_manager_add_dir(zathura->plugins.manager, path);
GIRARA_LIST_FOREACH_END(paths, char*, iter, path); GIRARA_LIST_FOREACH_END(paths, char*, iter, path);
girara_list_free(paths); girara_list_free(paths);
#endif #endif
@ -375,7 +398,7 @@ zathura_set_synctex_editor_command(zathura_t* zathura, const char* command)
} }
void void
zathura_set_syntex(zathura_t* zathura, bool value) zathura_set_synctex(zathura_t* zathura, bool value)
{ {
g_return_if_fail(zathura != NULL); g_return_if_fail(zathura != NULL);
g_return_if_fail(zathura->ui.session != NULL); g_return_if_fail(zathura->ui.session != NULL);
@ -453,7 +476,7 @@ document_info_open(gpointer data)
file = prepare_document_open_from_stdin(document_info->zathura); file = prepare_document_open_from_stdin(document_info->zathura);
if (file == NULL) { if (file == NULL) {
girara_notify(document_info->zathura->ui.session, GIRARA_ERROR, girara_notify(document_info->zathura->ui.session, GIRARA_ERROR,
"Could not read file from stdin and write it to a temporary file."); "Could not read file from stdin and write it to a temporary file.");
} else { } else {
document_info->zathura->stdin_support.file = g_strdup(file); document_info->zathura->stdin_support.file = g_strdup(file);
} }
@ -490,7 +513,7 @@ document_open(zathura_t* zathura, const char* path, const char* password)
if (path != NULL) { if (path != NULL) {
password_dialog_info->path = g_strdup(path); password_dialog_info->path = g_strdup(path);
girara_dialog(zathura->ui.session, "Enter password:", true, NULL, girara_dialog(zathura->ui.session, "Enter password:", true, NULL,
(girara_callback_inputbar_activate_t) cb_password_dialog, password_dialog_info); (girara_callback_inputbar_activate_t) cb_password_dialog, password_dialog_info);
goto error_out; goto error_out;
} else { } else {
free(password_dialog_info); free(password_dialog_info);
@ -730,8 +753,16 @@ document_save(zathura_t* zathura, const char* path, bool overwrite)
g_return_val_if_fail(path, false); g_return_val_if_fail(path, false);
gchar* file_path = girara_fix_path(path); gchar* file_path = girara_fix_path(path);
if ((overwrite == false) && g_file_test(file_path, G_FILE_TEST_EXISTS)) /* use current basename if path points to a directory */
{ if (g_file_test(file_path, G_FILE_TEST_IS_DIR) == TRUE) {
char* basename = g_path_get_basename(zathura_document_get_path(zathura->document));
char* tmp = file_path;
file_path = g_strconcat(file_path, "/", basename, NULL);
g_free(tmp);
g_free(basename);
}
if ((overwrite == false) && g_file_test(file_path, G_FILE_TEST_EXISTS)) {
girara_error("File already exists: %s. Use :write! to overwrite it.", file_path); girara_error("File already exists: %s. Use :write! to overwrite it.", file_path);
g_free(file_path); g_free(file_path);
return false; return false;
@ -935,14 +966,14 @@ page_widget_set_mode(zathura_t* zathura, unsigned int pages_per_row, unsigned in
pages_per_row = 1; pages_per_row = 1;
} }
/* ensure: 0 < first_page_column <= pages_per_row */ /* ensure: 0 < first_page_column <= pages_per_row */
if (first_page_column < 1) { if (first_page_column < 1) {
first_page_column = 1; first_page_column = 1;
} }
if (first_page_column > pages_per_row) { if (first_page_column > pages_per_row) {
first_page_column = ((first_page_column - 1) % pages_per_row) + 1; first_page_column = ((first_page_column - 1) % pages_per_row) + 1;
} }
if (zathura->document == NULL) { if (zathura->document == NULL) {
return; return;
@ -1026,3 +1057,98 @@ position_set_delayed(zathura_t* zathura, double position_x, double position_y)
return FALSE; return FALSE;
} }
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);
}
}
void
zathura_jumplist_append_jump(zathura_t* zathura)
{
zathura_jump_t *jump = g_malloc(sizeof(zathura_jump_t));
if (jump != NULL) {
jump->page = 0;
jump->x = 0;
jump->y = 0;
/* remove right tail after current */
if (zathura->jumplist.cur != NULL) {
girara_list_iterator_t *it = girara_list_iterator_copy(zathura->jumplist.cur);
girara_list_iterator_next(it);
while (girara_list_iterator_is_valid(it)) {
girara_list_iterator_remove(it);
zathura->jumplist.size = zathura->jumplist.size - 1;
}
g_free(it);
}
/* trim from beginning until max_size */
girara_list_iterator_t *it = girara_list_iterator(zathura->jumplist.list);
while (zathura->jumplist.size >= zathura->jumplist.max_size && girara_list_iterator_is_valid(it)) {
girara_list_iterator_remove(it);
zathura->jumplist.size = zathura->jumplist.size - 1;
}
g_free(it);
girara_list_append(zathura->jumplist.list, jump);
zathura->jumplist.size = zathura->jumplist.size + 1;
}
}
void
zathura_jumplist_add(zathura_t* zathura)
{
if (zathura->jumplist.list != NULL) {
unsigned int pagenum = zathura_document_get_current_page_number(zathura->document);
zathura_jump_t* cur = zathura_jumplist_current(zathura);
if (cur && cur->page == pagenum) {
return;
}
zathura_jumplist_append_jump(zathura);
girara_list_iterator_next(zathura->jumplist.cur);
zathura_jumplist_save(zathura);
}
}
void
zathura_jumplist_save(zathura_t* zathura)
{
zathura_jump_t* cur = zathura_jumplist_current(zathura);
unsigned int pagenum = zathura_document_get_current_page_number(zathura->document);
if (cur) {
/* get position */
GtkAdjustment* view_vadjustment = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
GtkAdjustment* view_hadjustment = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
cur->page = pagenum;
cur->x = gtk_adjustment_get_value(view_hadjustment) / zathura_document_get_scale(zathura->document);
cur->y = gtk_adjustment_get_value(view_vadjustment) / zathura_document_get_scale(zathura->document);;
}
}

View file

@ -28,6 +28,16 @@ typedef struct _ZathuraDatabase zathura_database_t;
struct render_thread_s; struct render_thread_s;
typedef struct render_thread_s render_thread_t; typedef struct render_thread_s render_thread_t;
/**
* Jump
*/
typedef struct zathura_jump_s
{
unsigned int page;
double x;
double y;
} zathura_jump_t;
struct zathura_s struct zathura_s
{ {
struct struct
@ -87,6 +97,7 @@ struct zathura_s
bool recolor_keep_hue; /**< Keep hue when recoloring */ bool recolor_keep_hue; /**< Keep hue when recoloring */
bool recolor; /**< Recoloring mode switch */ bool recolor; /**< Recoloring mode switch */
bool update_page_number; /**< Update current page number */ bool update_page_number; /**< Update current page number */
int search_direction; /**< Current search direction (FORWARD or BACKWARD) */
girara_list_t* marks; /**< Marker */ girara_list_t* marks; /**< Marker */
char** arguments; /**> Arguments that were passed at startup */ char** arguments; /**> Arguments that were passed at startup */
} global; } global;
@ -105,6 +116,14 @@ struct zathura_s
girara_list_t* bookmarks; /**< bookmarks */ girara_list_t* bookmarks; /**< bookmarks */
} bookmarks; } bookmarks;
struct
{
girara_list_t* list;
girara_list_iterator_t *cur;
unsigned int size;
unsigned int max_size;
} jumplist;
struct struct
{ {
gchar* file; gchar* file;
@ -192,12 +211,12 @@ void zathura_set_plugin_dir(zathura_t* zathura, const char* dir);
void zathura_set_synctex_editor_command(zathura_t* zathura, const char* command); void zathura_set_synctex_editor_command(zathura_t* zathura, const char* command);
/** /**
* En/Disable zathuras syntex support * En/Disable zathuras synctex support
* *
* @param zathura The zathura session * @param zathura The zathura session
* @param value The value * @param value The value
*/ */
void zathura_set_syntex(zathura_t* zathura, bool value); void zathura_set_synctex(zathura_t* zathura, bool value);
/** /**
* Sets the program parameters * Sets the program parameters
@ -292,4 +311,48 @@ void page_widget_set_mode(zathura_t* zathura, unsigned int pages_per_row, unsign
*/ */
void statusbar_page_number_update(zathura_t* zathura); void statusbar_page_number_update(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);
/**
* Save current page to the jumplist at current position
*
* @param zathura The zathura session
*/
void zathura_jumplist_save(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);
/**
* Add a page to the jumplist after current position
*
* @param zathura The zathura session
*/
void zathura_jumplist_append_jump(zathura_t* zathura);
#endif // ZATHURA_H #endif // ZATHURA_H

View file

@ -27,8 +27,8 @@ is not possible to write multiple commands in one single line.
COMMANDS COMMANDS
======== ========
set - Chaning options set - Changing options
--------------------- ----------------------
In addition to the build-in ``:set`` command zathura offers more options to be In addition to the build-in ``:set`` command zathura offers more options to be
changed and makes those changes permanent. To overwrite an option you just have changed and makes those changes permanent. To overwrite an option you just have
@ -79,8 +79,7 @@ it is possible to map bindings only for a specific mode by passing the ``mode``
argument which can take one of the following values: argument which can take one of the following values:
* normal (default) * normal (default)
* visual * fullscreen
* insert
* index * index
The brackets around the value are mandatory. The brackets around the value are mandatory.
@ -151,7 +150,7 @@ are currently available:
PageUp Page Up PageUp Page Up
Return Return Return Return
Space Space Space Space
Super Windows button Super Windows key
Tab Tab Tab Tab
Of course it is possible to combine those special keys with a modifier. The Of course it is possible to combine those special keys with a modifier. The
@ -206,11 +205,14 @@ The following shortcut functions can be mapped:
abort Switch back to normal mode abort Switch back to normal mode
adjust_window Adjust page width adjust_window Adjust page width
change_mode Change current mode change_mode Change current mode
follow Follow a link display_link Display link target
focus_inputbar Focus inputbar focus_inputbar Focus inputbar
follow Follow a link
goto Go to a certain page goto Go to a certain page
index_navigate Navigate through the index jumplist Move forwards/backwards in the jumplist
navigate Navigate to the next/previous page navigate Navigate to the next/previous page
navigate_index Navigate through the index
print Show the print dialog
quit Quit zathura quit Quit zathura
recolor Recolor the pages recolor Recolor the pages
reload Reload the document reload Reload the document
@ -221,6 +223,7 @@ The following shortcut functions can be mapped:
toggle_fullscreen Toggle fullscreen toggle_fullscreen Toggle fullscreen
toggle_index Show or hide index toggle_index Show or hide index
toggle_inputbar Show or hide inputbar toggle_inputbar Show or hide inputbar
toggle_page_mode Toggle between one and multiple pages per row
toggle_statusbar Show or hide statusbar toggle_statusbar Show or hide statusbar
zoom Zoom in or out zoom Zoom in or out
@ -490,6 +493,13 @@ Defines if the number of pages per row should be honored when advancing a page.
* Value type: Boolean * Value type: Boolean
* Default value: false * Default value: false
incremental-search
^^^^^^^^^^^^^^^^^^
En/Disables incremental search (search while typing).
* Value type: Boolean
* Default value: true
highlight-color highlight-color
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
Defines the color that is used for highlighting parts of the document (e.g.: Defines the color that is used for highlighting parts of the document (e.g.:
@ -598,6 +608,14 @@ Defines the step size of scrolling by calling the scroll command once
* Value type: Float * Value type: Float
* Default value: 40 * 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.1
scroll-wrap scroll-wrap
^^^^^^^^^^^ ^^^^^^^^^^^
Defines if the last/first page should be wrapped Defines if the last/first page should be wrapped
@ -605,6 +623,13 @@ Defines if the last/first page should be wrapped
* Value type: Boolean * Value type: Boolean
* Default value: false * Default value: false
scroll-page-aware
^^^^^^^^^^^^^^^^^
Defines if scrolling by half or full pages stops at page boundaries.
* Value type: Boolean
* Default value: false
search-hadjust search-hadjust
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
En/Disables horizontally centered search results En/Disables horizontally centered search results