From 46dfa2be2246eeedb2ae3d6692b41ed91e1142e6 Mon Sep 17 00:00:00 2001 From: Jimmy Date: Thu, 4 Feb 2021 16:16:02 -0800 Subject: [PATCH 01/12] pinned --- .gitignore | 1 + zathura/adjustment.c | 104 +++--- zathura/adjustment.h | 4 +- zathura/document.c | 392 +++++++++----------- zathura/plugin.c | 2 +- zathura/render.c | 722 ++++++++++++++++++------------------- zathura/synctex.c | 2 +- zathura/zathura.c | 840 ++++++++++++++++++++++--------------------- 8 files changed, 1003 insertions(+), 1064 deletions(-) diff --git a/.gitignore b/.gitignore index 5a2e88c..d4a447f 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ compile_commands.json *.log .ycm_extra_conf.py _*/ +.ccls-cache/ diff --git a/zathura/adjustment.c b/zathura/adjustment.c index fcd4d15..a8a99f6 100644 --- a/zathura/adjustment.c +++ b/zathura/adjustment.c @@ -5,21 +5,25 @@ #include -double -page_calc_height_width(zathura_document_t* document, double height, - double width, unsigned int* page_height, - unsigned int* page_width, bool rotate) -{ - g_return_val_if_fail(document != NULL && page_height != NULL && page_width != NULL, 0.0); +// @debug +#include + +double page_calc_height_width(zathura_document_t *document, double height, + double width, unsigned int *page_height, + unsigned int *page_width, bool rotate) { + g_return_val_if_fail( + document != NULL && page_height != NULL && page_width != NULL, 0.0); double scale = zathura_document_get_scale(document); + // TODO this just set all pages to the maximum. + // needs to adjust cell size based on the page size itself. if (rotate == true && zathura_document_get_rotation(document) % 180 != 0) { - *page_width = round(height * scale); - *page_height = round(width * scale); + *page_width = round(height * scale); + *page_height = round(width * scale); scale = MAX(*page_width / height, *page_height / width); } else { - *page_width = round(width * scale); + *page_width = round(width * scale); *page_height = round(height * scale); scale = MAX(*page_width / width, *page_height / height); } @@ -27,10 +31,8 @@ page_calc_height_width(zathura_document_t* document, double height, return scale; } -void -page_calc_position(zathura_document_t* document, double x, double y, double* xn, - double* yn) -{ +void page_calc_position(zathura_document_t *document, double x, double y, + double *xn, double *yn) { g_return_if_fail(document != NULL && xn != NULL && yn != NULL); const unsigned int rot = zathura_document_get_rotation(document); @@ -49,10 +51,8 @@ page_calc_position(zathura_document_t* document, double x, double y, double* xn, } } -unsigned int -position_to_page_number(zathura_document_t* document, double pos_x, - double pos_y) -{ +unsigned int position_to_page_number(zathura_document_t *document, double pos_x, + double pos_y) { g_return_val_if_fail(document != NULL, 0); unsigned int doc_width, doc_height; @@ -61,11 +61,11 @@ position_to_page_number(zathura_document_t* document, double pos_x, unsigned int cell_width, cell_height; zathura_document_get_cell_size(document, &cell_height, &cell_width); - unsigned int c0 = zathura_document_get_first_page_column(document); + unsigned int c0 = zathura_document_get_first_page_column(document); unsigned int npag = zathura_document_get_number_of_pages(document); unsigned int ncol = zathura_document_get_pages_per_row(document); unsigned int nrow = 0; - unsigned int pad = zathura_document_get_page_padding(document); + unsigned int pad = zathura_document_get_page_padding(document); if (c0 == 1) { /* There is no offset, so this is easy. */ @@ -75,8 +75,10 @@ position_to_page_number(zathura_document_t* document, double pos_x, nrow = 1 + (npag - (ncol - c0 - 1) + (ncol - 1)) / ncol; } - unsigned int col = floor(pos_x * (double)doc_width / (double)(cell_width + pad)); - unsigned int row = floor(pos_y * (double)doc_height / (double)(cell_height + pad)); + unsigned int col = + floor(pos_x * (double)doc_width / (double)(cell_width + pad)); + unsigned int row = + floor(pos_y * (double)doc_height / (double)(cell_height + pad)); unsigned int page = ncol * (row % nrow) + (col % ncol); if (page < c0 - 1) { @@ -86,22 +88,19 @@ position_to_page_number(zathura_document_t* document, double pos_x, } } - -void -page_number_to_position(zathura_document_t* document, unsigned int page_number, - double xalign, double yalign, double* pos_x, - double* pos_y) -{ +void page_number_to_position(zathura_document_t *document, + unsigned int page_number, double xalign, + double yalign, double *pos_x, double *pos_y) { g_return_if_fail(document != NULL); - unsigned int c0 = zathura_document_get_first_page_column(document); + unsigned int c0 = zathura_document_get_first_page_column(document); unsigned int npag = zathura_document_get_number_of_pages(document); unsigned int ncol = zathura_document_get_pages_per_row(document); - unsigned int nrow = (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */ + unsigned int nrow = (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */ /* row and column for page_number indexed from 0 */ - unsigned int row = (page_number + c0 - 1) / ncol; - unsigned int col = (page_number + c0 - 1) % ncol; + unsigned int row = (page_number + c0 - 1) / ncol; + unsigned int col = (page_number + c0 - 1) % ncol; /* sizes of page cell, viewport and document */ unsigned int cell_height = 0, cell_width = 0; @@ -113,14 +112,18 @@ page_number_to_position(zathura_document_t* document, unsigned int page_number, unsigned int doc_height = 0, doc_width = 0; zathura_document_get_document_size(document, &doc_height, &doc_width); - /* compute the shift to align to the viewport. If the page fits to viewport, just center it. */ + /* compute the shift to align to the viewport. If the page fits to viewport, + * just center it. */ double shift_x = 0.5, shift_y = 0.5; if (cell_width > view_width) { - shift_x = 0.5 + (xalign - 0.5) * ((double)cell_width - (double)view_width) / (double)cell_width; + shift_x = 0.5 + (xalign - 0.5) * ((double)cell_width - (double)view_width) / + (double)cell_width; } if (cell_height > view_height) { - shift_y = 0.5 + (yalign - 0.5) * ((double)cell_height - (double)view_height) / (double)cell_height; + shift_y = 0.5 + (yalign - 0.5) * + ((double)cell_height - (double)view_height) / + (double)cell_height; } /* compute the position */ @@ -128,10 +131,7 @@ page_number_to_position(zathura_document_t* document, unsigned int page_number, *pos_y = ((double)row + shift_y) / (double)nrow; } - -bool -page_is_visible(zathura_document_t *document, unsigned int page_number) -{ +bool page_is_visible(zathura_document_t *document, unsigned int page_number) { g_return_val_if_fail(document != NULL, false); /* position at the center of the viewport */ @@ -151,35 +151,31 @@ page_is_visible(zathura_document_t *document, unsigned int page_number) unsigned int view_width, view_height; zathura_document_get_viewport_size(document, &view_height, &view_width); - return ( fabs(pos_x - page_x) < 0.5 * (double)(view_width + cell_width) / (double)doc_width && - fabs(pos_y - page_y) < 0.5 * (double)(view_height + cell_height) / (double)doc_height); + return (fabs(pos_x - page_x) < + 0.5 * (double)(view_width + cell_width) / (double)doc_width && + fabs(pos_y - page_y) < + 0.5 * (double)(view_height + cell_height) / (double)doc_height); } -void -zathura_adjustment_set_value(GtkAdjustment* adjustment, gdouble value) -{ - const gdouble lower = gtk_adjustment_get_lower(adjustment); +void zathura_adjustment_set_value(GtkAdjustment *adjustment, gdouble value) { + const gdouble lower = gtk_adjustment_get_lower(adjustment); const gdouble upper_m_size = gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment); gtk_adjustment_set_value(adjustment, MAX(lower, MIN(upper_m_size, value))); } -gdouble -zathura_adjustment_get_ratio(GtkAdjustment* adjustment) -{ - gdouble lower = gtk_adjustment_get_lower(adjustment); - gdouble upper = gtk_adjustment_get_upper(adjustment); +gdouble zathura_adjustment_get_ratio(GtkAdjustment *adjustment) { + gdouble lower = gtk_adjustment_get_lower(adjustment); + gdouble upper = gtk_adjustment_get_upper(adjustment); gdouble page_size = gtk_adjustment_get_page_size(adjustment); - gdouble value = gtk_adjustment_get_value(adjustment); + gdouble value = gtk_adjustment_get_value(adjustment); return (value - lower + page_size / 2.0) / (upper - lower); } -void -zathura_adjustment_set_value_from_ratio(GtkAdjustment* adjustment, - gdouble ratio) -{ +void zathura_adjustment_set_value_from_ratio(GtkAdjustment *adjustment, + gdouble ratio) { if (ratio == 0.0) { return; } diff --git a/zathura/adjustment.h b/zathura/adjustment.h index 55110c7..033e67f 100644 --- a/zathura/adjustment.h +++ b/zathura/adjustment.h @@ -12,9 +12,9 @@ * desired. * * @param document the document - * @param height the original height + * @param height the original height * @param width the original width - * @param page_height the scaled and rotated height + * @param page_height the scaled and rotated height * @param page_width the scaled and rotated width * @param rotate honor page's rotation * @return real scale after rounding diff --git a/zathura/document.c b/zathura/document.c index 99f492f..bb98ba0 100644 --- a/zathura/document.c +++ b/zathura/document.c @@ -1,78 +1,80 @@ /* SPDX-License-Identifier: Zlib */ +#include +#include +#include +#include #include #include -#include -#include -#include -#include #include #include #include "adjustment.h" +#include "content-type.h" #include "document.h" -#include "utils.h" -#include "zathura.h" #include "page.h" #include "plugin.h" -#include "content-type.h" +#include "utils.h" +#include "zathura.h" +// @debug +#include /** * Document */ struct zathura_document_s { - char* file_path; /**< File path of the document */ - char* uri; /**< URI of the document */ - char* basename; /**< Basename of the document */ - uint8_t hash_sha256[32]; /**< SHA256 hash of the document */ - const char* password; /**< Password of the document */ - unsigned int current_page_number; /**< Current page number */ - unsigned int number_of_pages; /**< Number of pages */ - double zoom; /**< Zoom value */ - unsigned int rotate; /**< Rotation */ - void* data; /**< Custom data */ + char *file_path; /**< File path of the document */ + char *uri; /**< URI of the document */ + char *basename; /**< Basename of the document */ + uint8_t hash_sha256[32]; /**< SHA256 hash of the document */ + const char *password; /**< Password of the document */ + unsigned int current_page_number; /**< Current page number */ + unsigned int number_of_pages; /**< Number of pages */ + double zoom; /**< Zoom value */ + unsigned int rotate; /**< Rotation */ + void *data; /**< Custom data */ zathura_adjust_mode_t adjust_mode; /**< Adjust mode (best-fit, width) */ - int page_offset; /**< Page offset */ - double cell_width; /**< width of a page cell in the document (not transformed by scale and rotation) */ - double cell_height; /**< height of a page cell in the document (not transformed by scale and rotation) */ - unsigned int view_width; /**< width of current viewport */ + int page_offset; /**< Page offset */ + double cell_width; /**< width of a page cell in the document (not transformed + by scale and rotation) */ + double cell_height; /**< height of a page cell in the document (not + transformed by scale and rotation) */ + unsigned int view_width; /**< width of current viewport */ unsigned int view_height; /**< height of current viewport */ - double view_ppi; /**< PPI of the current viewport */ - zathura_device_factors_t device_factors; /**< x and y device scale factors (for e.g. HiDPI) */ - unsigned int pages_per_row; /**< number of pages in a row */ + double view_ppi; /**< PPI of the current viewport */ + zathura_device_factors_t + device_factors; /**< x and y device scale factors (for e.g. HiDPI) */ + unsigned int pages_per_row; /**< number of pages in a row */ unsigned int first_page_column; /**< column of the first page */ - unsigned int page_padding; /**< padding between pages */ - double position_x; /**< X adjustment */ - double position_y; /**< Y adjustment */ + unsigned int page_padding; /**< padding between pages */ + double position_x; /**< X adjustment */ + double position_y; /**< Y adjustment */ /** * Document pages */ - zathura_page_t** pages; + zathura_page_t **pages; /** * Used plugin */ - zathura_plugin_t* plugin; + zathura_plugin_t *plugin; }; -static void -check_set_error(zathura_error_t* error, zathura_error_t code) { +static void check_set_error(zathura_error_t *error, zathura_error_t code) { if (error != NULL) { *error = code; } } -static bool -hash_file_sha256(uint8_t* dst, const char* path) -{ - FILE* f = fopen(path, "rb"); +static bool hash_file_sha256(uint8_t *dst, const char *path) { + FILE *f = fopen(path, "rb"); if (f == NULL) { return false; } - GChecksum* checksum = g_checksum_new(G_CHECKSUM_SHA256); + GChecksum *checksum = g_checksum_new(G_CHECKSUM_SHA256); if (checksum == NULL) { fclose(f); return false; @@ -97,19 +99,18 @@ hash_file_sha256(uint8_t* dst, const char* path) return true; } -zathura_document_t* -zathura_document_open(zathura_t* zathura, const char* path, const char* uri, - const char* password, zathura_error_t* error) -{ +zathura_document_t *zathura_document_open(zathura_t *zathura, const char *path, + const char *uri, const char *password, + zathura_error_t *error) { if (zathura == NULL || path == NULL) { return NULL; } - GFile* file = g_file_new_for_path(path); - char* real_path = NULL; - char* content_type = NULL; - zathura_plugin_t* plugin = NULL; - zathura_document_t* document = NULL; + GFile *file = g_file_new_for_path(path); + char *real_path = NULL; + char *content_type = NULL; + zathura_plugin_t *plugin = NULL; + zathura_document_t *document = NULL; if (file == NULL) { girara_error("Error while handling path '%s'.", path); @@ -124,19 +125,22 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* uri, goto error_free; } - content_type = zathura_content_type_guess(zathura->content_type_context, real_path, zathura_plugin_manager_get_content_types(zathura->plugins.manager)); + content_type = zathura_content_type_guess( + zathura->content_type_context, real_path, + zathura_plugin_manager_get_content_types(zathura->plugins.manager)); if (content_type == NULL) { girara_error("Could not determine file type."); check_set_error(error, ZATHURA_ERROR_UNKNOWN); goto error_free; } - plugin = zathura_plugin_manager_get_plugin(zathura->plugins.manager, content_type); + plugin = + zathura_plugin_manager_get_plugin(zathura->plugins.manager, content_type); if (plugin == NULL) { girara_error("Unknown file type: '%s'", content_type); check_set_error(error, ZATHURA_ERROR_UNKNOWN); - g_free((void*)content_type); + g_free((void *)content_type); content_type = NULL; goto error_free; @@ -151,36 +155,37 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* uri, goto error_free; } - document->file_path = real_path; - document->uri = g_strdup(uri); + document->file_path = real_path; + document->uri = g_strdup(uri); if (document->uri == NULL) { - document->basename = g_file_get_basename(file); + document->basename = g_file_get_basename(file); } else { - GFile*gf = g_file_new_for_uri(document->uri); + GFile *gf = g_file_new_for_uri(document->uri); document->basename = g_file_get_basename(gf); g_object_unref(gf); } hash_file_sha256(document->hash_sha256, document->file_path); - document->password = password; - document->zoom = 1.0; - document->plugin = plugin; + document->password = password; + document->zoom = 1.0; + document->plugin = plugin; document->adjust_mode = ZATHURA_ADJUST_NONE; - document->cell_width = 0.0; + document->cell_width = 0.0; document->cell_height = 0.0; document->view_height = 0; - document->view_width = 0; - document->view_ppi = 0.0; + document->view_width = 0; + document->view_ppi = 0.0; document->device_factors.x = 1.0; document->device_factors.y = 1.0; - document->position_x = 0.0; - document->position_y = 0.0; + document->position_x = 0.0; + document->position_y = 0.0; real_path = NULL; g_object_unref(file); file = NULL; /* open document */ - const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin); + const zathura_plugin_functions_t *functions = + zathura_plugin_get_functions(plugin); if (functions->document_open == NULL) { girara_error("plugin has no open function\n"); goto error_free; @@ -194,14 +199,15 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* uri, } /* read all pages */ - document->pages = calloc(document->number_of_pages, sizeof(zathura_page_t*)); + document->pages = calloc(document->number_of_pages, sizeof(zathura_page_t *)); if (document->pages == NULL) { check_set_error(error, ZATHURA_ERROR_OUT_OF_MEMORY); goto error_free; } - for (unsigned int page_id = 0; page_id < document->number_of_pages; page_id++) { - zathura_page_t* page = zathura_page_new(document, page_id, NULL); + for (unsigned int page_id = 0; page_id < document->number_of_pages; + page_id++) { + zathura_page_t *page = zathura_page_new(document, page_id, NULL); if (page == NULL) { check_set_error(error, ZATHURA_ERROR_OUT_OF_MEMORY); goto error_free; @@ -209,7 +215,8 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* uri, document->pages[page_id] = page; - /* cell_width and cell_height is the maximum of all the pages width and height */ + /* cell_width and cell_height is the maximum of all the pages width and + * height */ const double width = zathura_page_get_width(page); if (document->cell_width < width) document->cell_width = width; @@ -239,16 +246,15 @@ error_free: return NULL; } -zathura_error_t -zathura_document_free(zathura_document_t* document) -{ +zathura_error_t zathura_document_free(zathura_document_t *document) { if (document == NULL || document->plugin == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; } if (document->pages != NULL) { /* free pages */ - for (unsigned int page_id = 0; page_id < document->number_of_pages; page_id++) { + for (unsigned int page_id = 0; page_id < document->number_of_pages; + page_id++) { zathura_page_free(document->pages[page_id]); document->pages[page_id] = NULL; } @@ -257,7 +263,8 @@ zathura_document_free(zathura_document_t* document) /* free document */ zathura_error_t error = ZATHURA_ERROR_OK; - const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t *functions = + zathura_plugin_get_functions(document->plugin); if (functions->document_free == NULL) { error = ZATHURA_ERROR_NOT_IMPLEMENTED; } else { @@ -273,9 +280,7 @@ zathura_document_free(zathura_document_t* document) return error; } -const char* -zathura_document_get_path(zathura_document_t* document) -{ +const char *zathura_document_get_path(zathura_document_t *document) { if (document == NULL) { return NULL; } @@ -283,9 +288,7 @@ zathura_document_get_path(zathura_document_t* document) return document->file_path; } -const uint8_t* -zathura_document_get_hash(zathura_document_t* document) -{ +const uint8_t *zathura_document_get_hash(zathura_document_t *document) { if (document == NULL) { return NULL; } @@ -293,9 +296,7 @@ zathura_document_get_hash(zathura_document_t* document) return document->hash_sha256; } -const char* -zathura_document_get_uri(zathura_document_t* document) -{ +const char *zathura_document_get_uri(zathura_document_t *document) { if (document == NULL) { return NULL; } @@ -303,9 +304,7 @@ zathura_document_get_uri(zathura_document_t* document) return document->uri; } -const char* -zathura_document_get_basename(zathura_document_t* document) -{ +const char *zathura_document_get_basename(zathura_document_t *document) { if (document == NULL) { return NULL; } @@ -313,9 +312,7 @@ zathura_document_get_basename(zathura_document_t* document) return document->basename; } -const char* -zathura_document_get_password(zathura_document_t* document) -{ +const char *zathura_document_get_password(zathura_document_t *document) { if (document == NULL) { return NULL; } @@ -323,19 +320,17 @@ zathura_document_get_password(zathura_document_t* document) return document->password; } -zathura_page_t* -zathura_document_get_page(zathura_document_t* document, unsigned int index) -{ - if (document == NULL || document->pages == NULL || (document->number_of_pages <= index)) { +zathura_page_t *zathura_document_get_page(zathura_document_t *document, + unsigned int index) { + if (document == NULL || document->pages == NULL || + (document->number_of_pages <= index)) { return NULL; } return document->pages[index]; } -void* -zathura_document_get_data(zathura_document_t* document) -{ +void *zathura_document_get_data(zathura_document_t *document) { if (document == NULL) { return NULL; } @@ -343,9 +338,7 @@ zathura_document_get_data(zathura_document_t* document) return document->data; } -void -zathura_document_set_data(zathura_document_t* document, void* data) -{ +void zathura_document_set_data(zathura_document_t *document, void *data) { if (document == NULL) { return; } @@ -354,8 +347,7 @@ zathura_document_set_data(zathura_document_t* document, void* data) } unsigned int -zathura_document_get_number_of_pages(zathura_document_t* document) -{ +zathura_document_get_number_of_pages(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -363,9 +355,8 @@ zathura_document_get_number_of_pages(zathura_document_t* document) return document->number_of_pages; } -void -zathura_document_set_number_of_pages(zathura_document_t* document, unsigned int number_of_pages) -{ +void zathura_document_set_number_of_pages(zathura_document_t *document, + unsigned int number_of_pages) { if (document == NULL) { return; } @@ -374,8 +365,7 @@ zathura_document_set_number_of_pages(zathura_document_t* document, unsigned int } unsigned int -zathura_document_get_current_page_number(zathura_document_t* document) -{ +zathura_document_get_current_page_number(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -383,10 +373,8 @@ zathura_document_get_current_page_number(zathura_document_t* document) return document->current_page_number; } -void -zathura_document_set_current_page_number(zathura_document_t* document, unsigned int - current_page) -{ +void zathura_document_set_current_page_number(zathura_document_t *document, + unsigned int current_page) { if (document == NULL) { return; } @@ -394,9 +382,7 @@ zathura_document_set_current_page_number(zathura_document_t* document, unsigned document->current_page_number = current_page; } -double -zathura_document_get_position_x(zathura_document_t* document) -{ +double zathura_document_get_position_x(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -404,9 +390,7 @@ zathura_document_get_position_x(zathura_document_t* document) return document->position_x; } -double -zathura_document_get_position_y(zathura_document_t* document) -{ +double zathura_document_get_position_y(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -414,9 +398,8 @@ zathura_document_get_position_y(zathura_document_t* document) return document->position_y; } -void -zathura_document_set_position_x(zathura_document_t* document, double position_x) -{ +void zathura_document_set_position_x(zathura_document_t *document, + double position_x) { if (document == NULL) { return; } @@ -424,9 +407,8 @@ zathura_document_set_position_x(zathura_document_t* document, double position_x) document->position_x = position_x; } -void -zathura_document_set_position_y(zathura_document_t* document, double position_y) -{ +void zathura_document_set_position_y(zathura_document_t *document, + double position_y) { if (document == NULL) { return; } @@ -434,9 +416,7 @@ zathura_document_set_position_y(zathura_document_t* document, double position_y) document->position_y = position_y; } -double -zathura_document_get_zoom(zathura_document_t* document) -{ +double zathura_document_get_zoom(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -444,9 +424,7 @@ zathura_document_get_zoom(zathura_document_t* document) return document->zoom; } -void -zathura_document_set_zoom(zathura_document_t* document, double zoom) -{ +void zathura_document_set_zoom(zathura_document_t *document, double zoom) { if (document == NULL) { return; } @@ -454,9 +432,7 @@ zathura_document_set_zoom(zathura_document_t* document, double zoom) document->zoom = zoom; } -double -zathura_document_get_scale(zathura_document_t* document) -{ +double zathura_document_get_scale(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -471,9 +447,7 @@ zathura_document_get_scale(zathura_document_t* document) return document->zoom * ppi / 72.0; } -unsigned int -zathura_document_get_rotation(zathura_document_t* document) -{ +unsigned int zathura_document_get_rotation(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -481,9 +455,8 @@ zathura_document_get_rotation(zathura_document_t* document) return document->rotate; } -void -zathura_document_set_rotation(zathura_document_t* document, unsigned int rotation) -{ +void zathura_document_set_rotation(zathura_document_t *document, + unsigned int rotation) { if (document == NULL) { return; } @@ -501,8 +474,7 @@ zathura_document_set_rotation(zathura_document_t* document, unsigned int rotatio } zathura_adjust_mode_t -zathura_document_get_adjust_mode(zathura_document_t* document) -{ +zathura_document_get_adjust_mode(zathura_document_t *document) { if (document == NULL) { return ZATHURA_ADJUST_NONE; } @@ -510,9 +482,8 @@ zathura_document_get_adjust_mode(zathura_document_t* document) return document->adjust_mode; } -void -zathura_document_set_adjust_mode(zathura_document_t* document, zathura_adjust_mode_t mode) -{ +void zathura_document_set_adjust_mode(zathura_document_t *document, + zathura_adjust_mode_t mode) { if (document == NULL) { return; } @@ -520,9 +491,7 @@ zathura_document_set_adjust_mode(zathura_document_t* document, zathura_adjust_mo document->adjust_mode = mode; } -int -zathura_document_get_page_offset(zathura_document_t* document) -{ +int zathura_document_get_page_offset(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -530,9 +499,8 @@ zathura_document_get_page_offset(zathura_document_t* document) return document->page_offset; } -void -zathura_document_set_page_offset(zathura_document_t* document, unsigned int page_offset) -{ +void zathura_document_set_page_offset(zathura_document_t *document, + unsigned int page_offset) { if (document == NULL) { return; } @@ -540,61 +508,53 @@ zathura_document_set_page_offset(zathura_document_t* document, unsigned int page document->page_offset = page_offset; } -void -zathura_document_set_viewport_width(zathura_document_t* document, unsigned int width) -{ +void zathura_document_set_viewport_width(zathura_document_t *document, + unsigned int width) { if (document == NULL) { return; } document->view_width = width; } -void -zathura_document_set_viewport_height(zathura_document_t* document, unsigned int height) -{ +void zathura_document_set_viewport_height(zathura_document_t *document, + unsigned int height) { if (document == NULL) { return; } document->view_height = height; } -void -zathura_document_set_viewport_ppi(zathura_document_t* document, double ppi) -{ +void zathura_document_set_viewport_ppi(zathura_document_t *document, + double ppi) { if (document == NULL) { return; } document->view_ppi = ppi; } -void -zathura_document_get_viewport_size(zathura_document_t* document, - unsigned int *height, unsigned int* width) -{ +void zathura_document_get_viewport_size(zathura_document_t *document, + unsigned int *height, + unsigned int *width) { g_return_if_fail(document != NULL && height != NULL && width != NULL); *height = document->view_height; *width = document->view_width; } -double -zathura_document_get_viewport_ppi(zathura_document_t* document) -{ +double zathura_document_get_viewport_ppi(zathura_document_t *document) { if (document == NULL) { return 0.0; } return document->view_ppi; } -void -zathura_document_set_device_factors(zathura_document_t* document, - double x_factor, double y_factor) -{ +void zathura_document_set_device_factors(zathura_document_t *document, + double x_factor, double y_factor) { if (document == NULL) { return; } if (fabs(x_factor) < DBL_EPSILON || fabs(y_factor) < DBL_EPSILON) { girara_debug("Ignoring new device factors %0.2f and %0.2f: too small", - x_factor, y_factor); + x_factor, y_factor); return; } @@ -603,8 +563,7 @@ zathura_document_set_device_factors(zathura_document_t* document, } zathura_device_factors_t -zathura_document_get_device_factors(zathura_document_t* document) -{ +zathura_document_get_device_factors(zathura_document_t *document) { if (document == NULL) { /* The function is guaranteed to not return zero values */ return (zathura_device_factors_t){1.0, 1.0}; @@ -613,20 +572,17 @@ zathura_document_get_device_factors(zathura_document_t* document) return document->device_factors; } -void -zathura_document_get_cell_size(zathura_document_t* document, - unsigned int* height, unsigned int* width) -{ +void zathura_document_get_cell_size(zathura_document_t *document, + unsigned int *height, unsigned int *width) { g_return_if_fail(document != NULL && height != NULL && width != NULL); page_calc_height_width(document, document->cell_height, document->cell_width, height, width, true); } -void -zathura_document_get_document_size(zathura_document_t* document, - unsigned int* height, unsigned int* width) -{ +void zathura_document_get_document_size(zathura_document_t *document, + unsigned int *height, + unsigned int *width) { g_return_if_fail(document != NULL && height != NULL && width != NULL); const unsigned int npag = zathura_document_get_number_of_pages(document); @@ -636,22 +592,23 @@ zathura_document_get_document_size(zathura_document_t* document, return; } - const unsigned int c0 = zathura_document_get_first_page_column(document); - const unsigned int nrow = (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */ - const unsigned int pad = zathura_document_get_page_padding(document); + const unsigned int c0 = zathura_document_get_first_page_column(document); + const unsigned int nrow = + (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */ + const unsigned int pad = zathura_document_get_page_padding(document); unsigned int cell_height = 0; - unsigned int cell_width = 0; + unsigned int cell_width = 0; zathura_document_get_cell_size(document, &cell_height, &cell_width); - *width = ncol * cell_width + (ncol - 1) * pad; + *width = ncol * cell_width + (ncol - 1) * pad; *height = nrow * cell_height + (nrow - 1) * pad; } -void -zathura_document_set_page_layout(zathura_document_t* document, unsigned int page_padding, - unsigned int pages_per_row, unsigned int first_page_column) -{ +void zathura_document_set_page_layout(zathura_document_t *document, + unsigned int page_padding, + unsigned int pages_per_row, + unsigned int first_page_column) { g_return_if_fail(document != NULL); document->page_padding = page_padding; @@ -666,18 +623,14 @@ zathura_document_set_page_layout(zathura_document_t* document, unsigned int page document->first_page_column = first_page_column; } -unsigned int -zathura_document_get_page_padding(zathura_document_t* document) -{ +unsigned int zathura_document_get_page_padding(zathura_document_t *document) { if (document == NULL) { return 0; } return document->page_padding; } -unsigned int -zathura_document_get_pages_per_row(zathura_document_t* document) -{ +unsigned int zathura_document_get_pages_per_row(zathura_document_t *document) { if (document == NULL) { return 0; } @@ -685,22 +638,21 @@ zathura_document_get_pages_per_row(zathura_document_t* document) } unsigned int -zathura_document_get_first_page_column(zathura_document_t* document) -{ +zathura_document_get_first_page_column(zathura_document_t *document) { if (document == NULL) { return 0; } return document->first_page_column; } -zathura_error_t -zathura_document_save_as(zathura_document_t* document, const char* path) -{ +zathura_error_t zathura_document_save_as(zathura_document_t *document, + const char *path) { if (document == NULL || document->plugin == NULL || path == NULL) { return ZATHURA_ERROR_UNKNOWN; } - const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t *functions = + zathura_plugin_get_functions(document->plugin); if (functions->document_save_as == NULL) { return ZATHURA_ERROR_NOT_IMPLEMENTED; } @@ -708,15 +660,16 @@ zathura_document_save_as(zathura_document_t* document, const char* path) return functions->document_save_as(document, document->data, path); } -girara_tree_node_t* -zathura_document_index_generate(zathura_document_t* document, zathura_error_t* error) -{ +girara_tree_node_t * +zathura_document_index_generate(zathura_document_t *document, + zathura_error_t *error) { if (document == NULL || document->plugin == NULL) { check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS); return NULL; } - const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t *functions = + zathura_plugin_get_functions(document->plugin); if (functions->document_index_generate == NULL) { check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED); return NULL; @@ -725,15 +678,15 @@ zathura_document_index_generate(zathura_document_t* document, zathura_error_t* e return functions->document_index_generate(document, document->data, error); } -girara_list_t* -zathura_document_attachments_get(zathura_document_t* document, zathura_error_t* error) -{ +girara_list_t *zathura_document_attachments_get(zathura_document_t *document, + zathura_error_t *error) { if (document == NULL || document->plugin == NULL) { check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS); return NULL; } - const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t *functions = + zathura_plugin_get_functions(document->plugin); if (functions->document_attachments_get == NULL) { check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED); return NULL; @@ -742,46 +695,49 @@ zathura_document_attachments_get(zathura_document_t* document, zathura_error_t* return functions->document_attachments_get(document, document->data, error); } -zathura_error_t -zathura_document_attachment_save(zathura_document_t* document, const char* attachment, const char* file) -{ +zathura_error_t zathura_document_attachment_save(zathura_document_t *document, + const char *attachment, + const char *file) { if (document == NULL || document->plugin == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; } - const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t *functions = + zathura_plugin_get_functions(document->plugin); if (functions->document_attachment_save == NULL) { return ZATHURA_ERROR_NOT_IMPLEMENTED; } - return functions->document_attachment_save(document, document->data, attachment, file); + return functions->document_attachment_save(document, document->data, + attachment, file); } -girara_list_t* -zathura_document_get_information(zathura_document_t* document, zathura_error_t* error) -{ +girara_list_t *zathura_document_get_information(zathura_document_t *document, + zathura_error_t *error) { if (document == NULL || document->plugin == NULL) { check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS); return NULL; } - const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t *functions = + zathura_plugin_get_functions(document->plugin); if (functions->document_get_information == NULL) { check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED); return NULL; } - girara_list_t* result = functions->document_get_information(document, document->data, error); + girara_list_t *result = + functions->document_get_information(document, document->data, error); if (result != NULL) { - girara_list_set_free_function(result, (girara_free_function_t) zathura_document_information_entry_free); + girara_list_set_free_function( + result, + (girara_free_function_t)zathura_document_information_entry_free); } return result; } -zathura_plugin_t* -zathura_document_get_plugin(zathura_document_t* document) -{ +zathura_plugin_t *zathura_document_get_plugin(zathura_document_t *document) { if (document == NULL) { return NULL; } diff --git a/zathura/plugin.c b/zathura/plugin.c index 0ccbac5..7b3e754 100644 --- a/zathura/plugin.c +++ b/zathura/plugin.c @@ -336,7 +336,7 @@ zathura_plugin_free(zathura_plugin_t* plugin) if (plugin == NULL) { return; } - + if (plugin->path != NULL) { g_free(plugin->path); } diff --git a/zathura/render.c b/zathura/render.c index b5a1041..5b97552 100644 --- a/zathura/render.c +++ b/zathura/render.c @@ -1,22 +1,23 @@ /* SPDX-License-Identifier: Zlib */ -#include -#include #include #include +#include +#include -#include "render.h" #include "adjustment.h" -#include "zathura.h" #include "document.h" -#include "page.h" #include "page-widget.h" +#include "page.h" +#include "render.h" #include "utils.h" +#include "zathura.h" +#include /* private data for ZathuraRenderer */ typedef struct private_s { - GThreadPool* pool; /**< Pool of threads */ - GMutex mutex; /**< Render lock */ + GThreadPool *pool; /**< Pool of threads */ + GMutex mutex; /**< Render lock */ volatile bool about_to_close; /**< Render thread is to be freed */ /** @@ -35,61 +36,60 @@ typedef struct private_s { * page cache */ struct { - int* cache; + int *cache; size_t size; size_t num_cached_pages; } page_cache; /* render requests */ - girara_list_t* requests; + girara_list_t *requests; } ZathuraRendererPrivate; /* private data for ZathuraRenderRequest */ typedef struct request_private_s { - ZathuraRenderer* renderer; - zathura_page_t* page; + ZathuraRenderer *renderer; + zathura_page_t *page; gint64 last_view_time; - girara_list_t* active_jobs; + girara_list_t *active_jobs; GMutex jobs_mutex; bool render_plain; } ZathuraRenderRequestPrivate; /* define the two types */ -G_DEFINE_TYPE_WITH_CODE(ZathuraRenderer, zathura_renderer, G_TYPE_OBJECT, G_ADD_PRIVATE(ZathuraRenderer)) -G_DEFINE_TYPE_WITH_CODE(ZathuraRenderRequest, zathura_render_request, G_TYPE_OBJECT, G_ADD_PRIVATE(ZathuraRenderRequest)) +G_DEFINE_TYPE_WITH_CODE(ZathuraRenderer, zathura_renderer, G_TYPE_OBJECT, + G_ADD_PRIVATE(ZathuraRenderer)) +G_DEFINE_TYPE_WITH_CODE(ZathuraRenderRequest, zathura_render_request, + G_TYPE_OBJECT, G_ADD_PRIVATE(ZathuraRenderRequest)) /* private methods for ZathuraRenderer */ -static void renderer_finalize(GObject* object); +static void renderer_finalize(GObject *object); /* private methods for ZathuraRenderRequest */ -static void render_request_dispose(GObject* object); -static void render_request_finalize(GObject* object); +static void render_request_dispose(GObject *object); +static void render_request_finalize(GObject *object); -static void render_job(void* data, void* user_data); +static void render_job(void *data, void *user_data); static gint render_thread_sort(gconstpointer a, gconstpointer b, gpointer data); -static ssize_t page_cache_lru_invalidate(ZathuraRenderer* renderer); -static void page_cache_invalidate_all(ZathuraRenderer* renderer); -static bool page_cache_is_full(ZathuraRenderer* renderer, bool* result); +static ssize_t page_cache_lru_invalidate(ZathuraRenderer *renderer); +static void page_cache_invalidate_all(ZathuraRenderer *renderer); +static bool page_cache_is_full(ZathuraRenderer *renderer, bool *result); /* job descritption for render thread */ typedef struct render_job_s { - ZathuraRenderRequest* request; + ZathuraRenderRequest *request; volatile bool aborted; } render_job_t; /* init, new and free for ZathuraRenderer */ -static void -zathura_renderer_class_init(ZathuraRendererClass* class) -{ +static void zathura_renderer_class_init(ZathuraRendererClass *class) { /* overwrite methods */ - GObjectClass* object_class = G_OBJECT_CLASS(class); - object_class->finalize = renderer_finalize; + GObjectClass *object_class = G_OBJECT_CLASS(class); + object_class->finalize = renderer_finalize; } -static void -zathura_renderer_init(ZathuraRenderer* renderer) -{ - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); +static void zathura_renderer_init(ZathuraRenderer *renderer) { + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); priv->pool = g_thread_pool_new(render_job, renderer, 1, TRUE, NULL); priv->about_to_close = false; g_thread_pool_set_sort_function(priv->pool, render_thread_sort, NULL); @@ -110,12 +110,11 @@ zathura_renderer_init(ZathuraRenderer* renderer) priv->requests = girara_list_new(); } -static bool -page_cache_init(ZathuraRenderer* renderer, size_t cache_size) -{ - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); +static bool page_cache_init(ZathuraRenderer *renderer, size_t cache_size) { + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); - priv->page_cache.size = cache_size; + priv->page_cache.size = cache_size; priv->page_cache.cache = g_try_malloc0(cache_size * sizeof(int)); if (priv->page_cache.cache == NULL) { return false; @@ -125,13 +124,11 @@ page_cache_init(ZathuraRenderer* renderer, size_t cache_size) return true; } -ZathuraRenderer* -zathura_renderer_new(size_t cache_size) -{ +ZathuraRenderer *zathura_renderer_new(size_t cache_size) { g_return_val_if_fail(cache_size > 0, NULL); - GObject* obj = g_object_new(ZATHURA_TYPE_RENDERER, NULL); - ZathuraRenderer* ret = ZATHURA_RENDERER(obj); + GObject *obj = g_object_new(ZATHURA_TYPE_RENDERER, NULL); + ZathuraRenderer *ret = ZATHURA_RENDERER(obj); if (page_cache_init(ret, cache_size) == false) { g_object_unref(obj); @@ -141,11 +138,10 @@ zathura_renderer_new(size_t cache_size) return ret; } -static void -renderer_finalize(GObject* object) -{ - ZathuraRenderer* renderer = ZATHURA_RENDERER(object); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); +static void renderer_finalize(GObject *object) { + ZathuraRenderer *renderer = ZATHURA_RENDERER(object); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); zathura_renderer_stop(renderer); if (priv->pool != NULL) { @@ -159,19 +155,17 @@ renderer_finalize(GObject* object) /* (un)register requests at the renderer */ -static void -renderer_unregister_request(ZathuraRenderer* renderer, - ZathuraRenderRequest* request) -{ - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); +static void renderer_unregister_request(ZathuraRenderer *renderer, + ZathuraRenderRequest *request) { + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); girara_list_remove(priv->requests, request); } -static void -renderer_register_request(ZathuraRenderer* renderer, - ZathuraRenderRequest* request) -{ - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); +static void renderer_register_request(ZathuraRenderer *renderer, + ZathuraRenderRequest *request) { + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); if (girara_list_contains(priv->requests, request) == false) { girara_list_append(priv->requests, request); } @@ -186,68 +180,47 @@ enum { REQUEST_LAST_SIGNAL }; -static guint request_signals[REQUEST_LAST_SIGNAL] = { 0 }; +static guint request_signals[REQUEST_LAST_SIGNAL] = {0}; static void -zathura_render_request_class_init(ZathuraRenderRequestClass* class) -{ +zathura_render_request_class_init(ZathuraRenderRequestClass *class) { /* overwrite methods */ - GObjectClass* object_class = G_OBJECT_CLASS(class); - object_class->dispose = render_request_dispose; - object_class->finalize = render_request_finalize; + GObjectClass *object_class = G_OBJECT_CLASS(class); + object_class->dispose = render_request_dispose; + object_class->finalize = render_request_finalize; - request_signals[REQUEST_COMPLETED] = g_signal_new("completed", - ZATHURA_TYPE_RENDER_REQUEST, - G_SIGNAL_RUN_LAST, - 0, - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 1, - G_TYPE_POINTER); + request_signals[REQUEST_COMPLETED] = g_signal_new( + "completed", ZATHURA_TYPE_RENDER_REQUEST, G_SIGNAL_RUN_LAST, 0, NULL, + NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_POINTER); - request_signals[REQUEST_CACHE_ADDED] = g_signal_new("cache-added", - ZATHURA_TYPE_RENDER_REQUEST, - G_SIGNAL_RUN_LAST, - 0, - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 0); + request_signals[REQUEST_CACHE_ADDED] = g_signal_new( + "cache-added", ZATHURA_TYPE_RENDER_REQUEST, G_SIGNAL_RUN_LAST, 0, NULL, + NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0); - request_signals[REQUEST_CACHE_INVALIDATED] = g_signal_new("cache-invalidated", - ZATHURA_TYPE_RENDER_REQUEST, - G_SIGNAL_RUN_LAST, - 0, - NULL, - NULL, - g_cclosure_marshal_generic, - G_TYPE_NONE, - 0); + request_signals[REQUEST_CACHE_INVALIDATED] = g_signal_new( + "cache-invalidated", ZATHURA_TYPE_RENDER_REQUEST, G_SIGNAL_RUN_LAST, 0, + NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0); } -static void -zathura_render_request_init(ZathuraRenderRequest* request) -{ - ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); +static void zathura_render_request_init(ZathuraRenderRequest *request) { + ZathuraRenderRequestPrivate *priv = + zathura_render_request_get_instance_private(request); priv->renderer = NULL; priv->page = NULL; } -ZathuraRenderRequest* -zathura_render_request_new(ZathuraRenderer* renderer, zathura_page_t* page) -{ +ZathuraRenderRequest *zathura_render_request_new(ZathuraRenderer *renderer, + zathura_page_t *page) { g_return_val_if_fail(renderer != NULL && page != NULL, NULL); - GObject* obj = g_object_new(ZATHURA_TYPE_RENDER_REQUEST, NULL); + GObject *obj = g_object_new(ZATHURA_TYPE_RENDER_REQUEST, NULL); if (obj == NULL) { return NULL; } - ZathuraRenderRequest* request = ZATHURA_RENDER_REQUEST(obj); - ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); + ZathuraRenderRequest *request = ZATHURA_RENDER_REQUEST(obj); + ZathuraRenderRequestPrivate *priv = + zathura_render_request_get_instance_private(request); /* we want to make sure that renderer lives long enough */ priv->renderer = g_object_ref(renderer); priv->page = page; @@ -261,11 +234,10 @@ zathura_render_request_new(ZathuraRenderer* renderer, zathura_page_t* page) return request; } -static void -render_request_dispose(GObject* object) -{ - ZathuraRenderRequest* request = ZATHURA_RENDER_REQUEST(object); - ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); +static void render_request_dispose(GObject *object) { + ZathuraRenderRequest *request = ZATHURA_RENDER_REQUEST(object); + ZathuraRenderRequestPrivate *priv = + zathura_render_request_get_instance_private(request); if (priv->renderer != NULL) { /* unregister the request */ @@ -277,11 +249,10 @@ render_request_dispose(GObject* object) G_OBJECT_CLASS(zathura_render_request_parent_class)->dispose(object); } -static void -render_request_finalize(GObject* object) -{ - ZathuraRenderRequest* request = ZATHURA_RENDER_REQUEST(object); - ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); +static void render_request_finalize(GObject *object) { + ZathuraRenderRequest *request = ZATHURA_RENDER_REQUEST(object); + ZathuraRenderRequestPrivate *priv = + zathura_render_request_get_instance_private(request); if (girara_list_size(priv->active_jobs) != 0) { girara_error("This should not happen!"); @@ -294,66 +265,62 @@ render_request_finalize(GObject* object) /* renderer methods */ -bool -zathura_renderer_recolor_enabled(ZathuraRenderer* renderer) -{ +bool zathura_renderer_recolor_enabled(ZathuraRenderer *renderer) { g_return_val_if_fail(ZATHURA_IS_RENDERER(renderer), false); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); return priv->recolor.enabled; } -void -zathura_renderer_enable_recolor(ZathuraRenderer* renderer, bool enable) -{ +void zathura_renderer_enable_recolor(ZathuraRenderer *renderer, bool enable) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); priv->recolor.enabled = enable; } -bool -zathura_renderer_recolor_hue_enabled(ZathuraRenderer* renderer) -{ +bool zathura_renderer_recolor_hue_enabled(ZathuraRenderer *renderer) { g_return_val_if_fail(ZATHURA_IS_RENDERER(renderer), false); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); return priv->recolor.hue; } -void -zathura_renderer_enable_recolor_hue(ZathuraRenderer* renderer, bool enable) -{ +void zathura_renderer_enable_recolor_hue(ZathuraRenderer *renderer, + bool enable) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); priv->recolor.hue = enable; } -bool -zathura_renderer_recolor_reverse_video_enabled(ZathuraRenderer* renderer) -{ +bool zathura_renderer_recolor_reverse_video_enabled(ZathuraRenderer *renderer) { g_return_val_if_fail(ZATHURA_IS_RENDERER(renderer), false); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); return priv->recolor.reverse_video; } -void -zathura_renderer_enable_recolor_reverse_video(ZathuraRenderer* renderer, bool enable) -{ +void zathura_renderer_enable_recolor_reverse_video(ZathuraRenderer *renderer, + bool enable) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); priv->recolor.reverse_video = enable; } -void -zathura_renderer_set_recolor_colors(ZathuraRenderer* renderer, - const GdkRGBA* light, const GdkRGBA* dark) -{ +void zathura_renderer_set_recolor_colors(ZathuraRenderer *renderer, + const GdkRGBA *light, + const GdkRGBA *dark) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); if (light != NULL) { memcpy(&priv->recolor.light, light, sizeof(GdkRGBA)); } @@ -362,10 +329,9 @@ zathura_renderer_set_recolor_colors(ZathuraRenderer* renderer, } } -void -zathura_renderer_set_recolor_colors_str(ZathuraRenderer* renderer, - const char* light, const char* dark) -{ +void zathura_renderer_set_recolor_colors_str(ZathuraRenderer *renderer, + const char *light, + const char *dark) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); if (dark != NULL) { @@ -382,13 +348,12 @@ zathura_renderer_set_recolor_colors_str(ZathuraRenderer* renderer, } } -void -zathura_renderer_get_recolor_colors(ZathuraRenderer* renderer, - GdkRGBA* light, GdkRGBA* dark) -{ +void zathura_renderer_get_recolor_colors(ZathuraRenderer *renderer, + GdkRGBA *light, GdkRGBA *dark) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); if (light != NULL) { memcpy(light, &priv->recolor.light, sizeof(GdkRGBA)); } @@ -397,57 +362,53 @@ zathura_renderer_get_recolor_colors(ZathuraRenderer* renderer, } } -void -zathura_renderer_lock(ZathuraRenderer* renderer) -{ +void zathura_renderer_lock(ZathuraRenderer *renderer) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); g_mutex_lock(&priv->mutex); } -void -zathura_renderer_unlock(ZathuraRenderer* renderer) -{ +void zathura_renderer_unlock(ZathuraRenderer *renderer) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); g_mutex_unlock(&priv->mutex); } -void -zathura_renderer_stop(ZathuraRenderer* renderer) -{ +void zathura_renderer_stop(ZathuraRenderer *renderer) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); priv->about_to_close = true; } - /* ZathuraRenderRequest methods */ -void -zathura_render_request(ZathuraRenderRequest* request, gint64 last_view_time) -{ +void zathura_render_request(ZathuraRenderRequest *request, + gint64 last_view_time) { g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(request); g_mutex_lock(&request_priv->jobs_mutex); bool unfinished_jobs = false; /* check if there are any active jobs left */ - GIRARA_LIST_FOREACH_BODY(request_priv->active_jobs, render_job_t*, job, - if (job->aborted == false) { - unfinished_jobs = true; - break; - } - ); + GIRARA_LIST_FOREACH_BODY( + request_priv->active_jobs, render_job_t *, job, + if (job->aborted == false) { + unfinished_jobs = true; + break; + }); /* only add a new job if there are no active ones left */ if (unfinished_jobs == false) { request_priv->last_view_time = last_view_time; - render_job_t* job = g_try_malloc0(sizeof(render_job_t)); + render_job_t *job = g_try_malloc0(sizeof(render_job_t)); if (job == NULL) { return; } @@ -456,41 +417,38 @@ zathura_render_request(ZathuraRenderRequest* request, gint64 last_view_time) job->aborted = false; girara_list_append(request_priv->active_jobs, job); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(request_priv->renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(request_priv->renderer); g_thread_pool_push(priv->pool, job, NULL); } g_mutex_unlock(&request_priv->jobs_mutex); } -void -zathura_render_request_abort(ZathuraRenderRequest* request) -{ +void zathura_render_request_abort(ZathuraRenderRequest *request) { g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(request); g_mutex_lock(&request_priv->jobs_mutex); - GIRARA_LIST_FOREACH_BODY(request_priv->active_jobs, render_job_t*, job, - job->aborted = true; - ); + GIRARA_LIST_FOREACH_BODY(request_priv->active_jobs, render_job_t *, job, + job->aborted = true;); g_mutex_unlock(&request_priv->jobs_mutex); } -void -zathura_render_request_update_view_time(ZathuraRenderRequest* request) -{ +void zathura_render_request_update_view_time(ZathuraRenderRequest *request) { g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(request); request_priv->last_view_time = g_get_real_time(); } /* render job */ -static void -remove_job_and_free(render_job_t* job) -{ - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(job->request); +static void remove_job_and_free(render_job_t *job) { + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(job->request); g_mutex_lock(&request_priv->jobs_mutex); girara_list_remove(request_priv->active_jobs, job); @@ -500,28 +458,28 @@ remove_job_and_free(render_job_t* job) g_free(job); } -typedef struct emit_completed_signal_s -{ - render_job_t* job; - cairo_surface_t* surface; +typedef struct emit_completed_signal_s { + render_job_t *job; + cairo_surface_t *surface; } emit_completed_signal_t; -static gboolean -emit_completed_signal(void* data) -{ - emit_completed_signal_t* ecs = data; - render_job_t* job = ecs->job; - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(job->request); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(request_priv->renderer); +static gboolean emit_completed_signal(void *data) { + emit_completed_signal_t *ecs = data; + render_job_t *job = ecs->job; + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(job->request); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(request_priv->renderer); if (priv->about_to_close == false && job->aborted == false) { /* emit the signal */ girara_debug("Emitting signal for page %d", - zathura_page_get_index(request_priv->page) + 1); - g_signal_emit(job->request, request_signals[REQUEST_COMPLETED], 0, ecs->surface); + zathura_page_get_index(request_priv->page) + 1); + g_signal_emit(job->request, request_signals[REQUEST_COMPLETED], 0, + ecs->surface); } else { girara_debug("Rendering of page %d aborted", - zathura_page_get_index(request_priv->page) + 1); + zathura_page_get_index(request_priv->page) + 1); } /* mark the request as done */ remove_job_and_free(job); @@ -536,37 +494,37 @@ emit_completed_signal(void* data) /* Returns the maximum possible saturation for given h and l. Assumes that l is in the interval l1, l2 and corrects the value to force u=0 on l1 and l2 */ -static double -colorumax(const double h[3], double l, double l1, double l2) -{ - if (fabs(h[0]) <= DBL_EPSILON && fabs(h[1]) <= DBL_EPSILON && fabs(h[2]) <= DBL_EPSILON) { +static double colorumax(const double h[3], double l, double l1, double l2) { + if (fabs(h[0]) <= DBL_EPSILON && fabs(h[1]) <= DBL_EPSILON && + fabs(h[2]) <= DBL_EPSILON) { return 0; } - const double lv = (l - l1) / (l2 - l1); /* Remap l to the whole interval [0,1] */ + const double lv = + (l - l1) / (l2 - l1); /* Remap l to the whole interval [0,1] */ double u = DBL_MAX; double v = DBL_MAX; for (unsigned int k = 0; k < 3; ++k) { if (h[k] > DBL_EPSILON) { - u = fmin(fabs((1-l)/h[k]), u); - v = fmin(fabs((1-lv)/h[k]), v); + u = fmin(fabs((1 - l) / h[k]), u); + v = fmin(fabs((1 - lv) / h[k]), v); } else if (h[k] < -DBL_EPSILON) { - u = fmin(fabs(l/h[k]), u); - v = fmin(fabs(lv/h[k]), v); + u = fmin(fabs(l / h[k]), u); + v = fmin(fabs(lv / h[k]), v); } } /* rescale v according to the length of the interval [l1, l2] */ v = fabs(l2 - l1) * v; - /* forces the returned value to be 0 on l1 and l2, trying not to distort colors too much */ + /* forces the returned value to be 0 on l1 and l2, trying not to distort + * colors too much */ return fmin(u, v); } -static void -recolor(ZathuraRendererPrivate* priv, zathura_page_t* page, unsigned int page_width, - unsigned int page_height, cairo_surface_t* surface) -{ +static void recolor(ZathuraRendererPrivate *priv, zathura_page_t *page, + unsigned int page_width, unsigned int page_height, + cairo_surface_t *surface) { /* uses a representation of a rgb color as follows: - a lightness scalar (between 0,1), which is a weighted average of r, g, b, - a hue vector, which indicates a radian direction from the grey axis, @@ -583,8 +541,8 @@ recolor(ZathuraRendererPrivate* priv, zathura_page_t* page, unsigned int page_wi cairo_surface_flush(surface); - const int rowstride = cairo_image_surface_get_stride(surface); - unsigned char* image = cairo_image_surface_get_data(surface); + const int rowstride = cairo_image_surface_get_stride(surface); + unsigned char *image = cairo_image_surface_get_data(surface); /* RGB weights for computing lightness. Must sum to one */ static const double a[] = {0.30, 0.59, 0.11}; @@ -592,38 +550,37 @@ recolor(ZathuraRendererPrivate* priv, zathura_page_t* page, unsigned int page_wi const GdkRGBA rgb1 = priv->recolor.dark; const GdkRGBA rgb2 = priv->recolor.light; - const double l1 = a[0]*rgb1.red + a[1]*rgb1.green + a[2]*rgb1.blue; - const double l2 = a[0]*rgb2.red + a[1]*rgb2.green + a[2]*rgb2.blue; + const double l1 = a[0] * rgb1.red + a[1] * rgb1.green + a[2] * rgb1.blue; + const double l2 = a[0] * rgb2.red + a[1] * rgb2.green + a[2] * rgb2.blue; const double negalph1 = 1. - rgb1.alpha; const double negalph2 = 1. - rgb2.alpha; - const double rgb_diff[] = { - rgb2.red - rgb1.red, - rgb2.green - rgb1.green, - rgb2.blue - rgb1.blue - }; + const double rgb_diff[] = {rgb2.red - rgb1.red, rgb2.green - rgb1.green, + rgb2.blue - rgb1.blue}; const double h1[3] = { - rgb1.red*rgb1.alpha - l1, - rgb1.green*rgb1.alpha - l1, - rgb1.blue*rgb1.alpha - l1, + rgb1.red * rgb1.alpha - l1, + rgb1.green * rgb1.alpha - l1, + rgb1.blue * rgb1.alpha - l1, }; const double h2[3] = { - rgb2.red*rgb2.alpha - l2, - rgb2.green*rgb2.alpha - l2, - rgb2.blue*rgb2.alpha - l2, + rgb2.red * rgb2.alpha - l2, + rgb2.green * rgb2.alpha - l2, + rgb2.blue * rgb2.alpha - l2, }; /* Decide if we can use the older, faster formulas */ - const bool fast_formula = (!priv->recolor.hue || ( - fabs(rgb1.red - rgb1.blue) < DBL_EPSILON && fabs(rgb1.red - rgb1.green) < DBL_EPSILON && - fabs(rgb2.red - rgb2.blue) < DBL_EPSILON && fabs(rgb2.red - rgb2.green) < DBL_EPSILON - )) && (rgb1.alpha >= 1. - DBL_EPSILON && rgb2.alpha >= 1. - DBL_EPSILON); + const bool fast_formula = + (!priv->recolor.hue || (fabs(rgb1.red - rgb1.blue) < DBL_EPSILON && + fabs(rgb1.red - rgb1.green) < DBL_EPSILON && + fabs(rgb2.red - rgb2.blue) < DBL_EPSILON && + fabs(rgb2.red - rgb2.green) < DBL_EPSILON)) && + (rgb1.alpha >= 1. - DBL_EPSILON && rgb2.alpha >= 1. - DBL_EPSILON); - girara_list_t* images = NULL; - girara_list_t* rectangles = NULL; - bool found_images = false; + girara_list_t *images = NULL; + girara_list_t *rectangles = NULL; + bool found_images = false; /* If in reverse video mode retrieve images */ if (priv->recolor.reverse_video == true) { @@ -638,31 +595,29 @@ recolor(ZathuraRendererPrivate* priv, zathura_page_t* page, unsigned int page_wi if (found_images == true) { /* Get images bounding boxes */ - GIRARA_LIST_FOREACH_BODY(images, zathura_image_t*, image_it, - zathura_rectangle_t* rect = g_try_malloc(sizeof(zathura_rectangle_t)); - if (rect == NULL) { - break; - } - *rect = recalc_rectangle(page, image_it->position); - girara_list_append(rectangles, rect); - ); + GIRARA_LIST_FOREACH_BODY( + images, zathura_image_t *, image_it, + zathura_rectangle_t *rect = g_try_malloc(sizeof(zathura_rectangle_t)); + if (rect == NULL) { break; } *rect = + recalc_rectangle(page, image_it->position); + girara_list_append(rectangles, rect);); } } for (unsigned int y = 0; y < page_height; y++) { - unsigned char* data = image + y * rowstride; + unsigned char *data = image + y * rowstride; for (unsigned int x = 0; x < page_width; x++, data += 4) { /* Check if the pixel belongs to an image when in reverse video mode*/ - if (priv->recolor.reverse_video == true && found_images == true){ + if (priv->recolor.reverse_video == true && found_images == true) { bool inside_image = false; - GIRARA_LIST_FOREACH_BODY(rectangles, zathura_rectangle_t*, rect_it, - if (rect_it->x1 <= x && rect_it->x2 >= x && - rect_it->y1 <= y && rect_it->y2 >= y) { - inside_image = true; - break; - } - ); + GIRARA_LIST_FOREACH_BODY( + rectangles, zathura_rectangle_t *, rect_it, + if (rect_it->x1 <= x && rect_it->x2 >= x && rect_it->y1 <= y && + rect_it->y2 >= y) { + inside_image = true; + break; + }); /* If it's inside and image don't recolor */ if (inside_image == true) { /* It is not guaranteed that the pixel is already opaque. */ @@ -672,23 +627,15 @@ recolor(ZathuraRendererPrivate* priv, zathura_page_t* page, unsigned int page_wi } /* Careful. data color components blue, green, red. */ - const double rgb[3] = { - data[2] / 255., - data[1] / 255., - data[0] / 255. - }; + const double rgb[3] = {data[2] / 255., data[1] / 255., data[0] / 255.}; /* compute h, s, l data */ - double l = a[0]*rgb[0] + a[1]*rgb[1] + a[2]*rgb[2]; + double l = a[0] * rgb[0] + a[1] * rgb[1] + a[2] * rgb[2]; if (priv->recolor.hue == true) { /* adjusting lightness keeping hue of current color. white and black * go to grays of same ligtness as light and dark colors. */ - const double h[3] = { - rgb[0] - l, - rgb[1] - l, - rgb[2] - l - }; + const double h[3] = {rgb[0] - l, rgb[1] - l, rgb[2] - l}; /* u is the maximum possible saturation for given h and l. s is a * rescaled saturation between 0 and 1 */ @@ -703,34 +650,45 @@ recolor(ZathuraRendererPrivate* priv, zathura_page_t* page, unsigned int page_wi if (fast_formula) { data[3] = 255; - data[2] = (unsigned char)round(255.*(l + su * h[0])); - data[1] = (unsigned char)round(255.*(l + su * h[1])); - data[0] = (unsigned char)round(255.*(l + su * h[2])); + data[2] = (unsigned char)round(255. * (l + su * h[0])); + data[1] = (unsigned char)round(255. * (l + su * h[1])); + data[0] = (unsigned char)round(255. * (l + su * h[2])); } else { /* Mix lightcolor, darkcolor and the original color, according to the * minimal and maximal channel of the original color */ const double tr1 = (1. - fmax(fmax(rgb[0], rgb[1]), rgb[2])); const double tr2 = fmin(fmin(rgb[0], rgb[1]), rgb[2]); - data[3] = (unsigned char)round(255.*(1. - tr1*negalph1 - tr2*negalph2)); - data[2] = (unsigned char)round(255.*fmin(1, fmax(0, tr1*h1[0] + tr2*h2[0] + (l + su * h[0])))); - data[1] = (unsigned char)round(255.*fmin(1, fmax(0, tr1*h1[1] + tr2*h2[1] + (l + su * h[1])))); - data[0] = (unsigned char)round(255.*fmin(1, fmax(0, tr1*h1[2] + tr2*h2[2] + (l + su * h[2])))); + data[3] = (unsigned char)round( + 255. * (1. - tr1 * negalph1 - tr2 * negalph2)); + data[2] = (unsigned char)round( + 255. * + fmin(1, fmax(0, tr1 * h1[0] + tr2 * h2[0] + (l + su * h[0])))); + data[1] = (unsigned char)round( + 255. * + fmin(1, fmax(0, tr1 * h1[1] + tr2 * h2[1] + (l + su * h[1])))); + data[0] = (unsigned char)round( + 255. * + fmin(1, fmax(0, tr1 * h1[2] + tr2 * h2[2] + (l + su * h[2])))); } } else { /* linear interpolation between dark and light with color ligtness as * a parameter */ if (fast_formula) { data[3] = 255; - data[2] = (unsigned char)round(255.*(l * rgb_diff[0] + rgb1.red)); - data[1] = (unsigned char)round(255.*(l * rgb_diff[1] + rgb1.green)); - data[0] = (unsigned char)round(255.*(l * rgb_diff[2] + rgb1.blue)); + data[2] = (unsigned char)round(255. * (l * rgb_diff[0] + rgb1.red)); + data[1] = (unsigned char)round(255. * (l * rgb_diff[1] + rgb1.green)); + data[0] = (unsigned char)round(255. * (l * rgb_diff[2] + rgb1.blue)); } else { - const double f1 = 1. - (1. - fmax(fmax(rgb[0], rgb[1]), rgb[2]))*negalph1; - const double f2 = fmin(fmin(rgb[0], rgb[1]), rgb[2])*negalph2; - data[3] = (unsigned char)round(255.*(f1 - f2)); - data[2] = (unsigned char)round(255.*(l * rgb_diff[0] - f2*rgb2.red + f1*rgb1.red)); - data[1] = (unsigned char)round(255.*(l * rgb_diff[1] - f2*rgb2.green + f1*rgb1.green)); - data[0] = (unsigned char)round(255.*(l * rgb_diff[2] - f2*rgb2.blue + f1*rgb1.blue)); + const double f1 = + 1. - (1. - fmax(fmax(rgb[0], rgb[1]), rgb[2])) * negalph1; + const double f2 = fmin(fmin(rgb[0], rgb[1]), rgb[2]) * negalph2; + data[3] = (unsigned char)round(255. * (f1 - f2)); + data[2] = (unsigned char)round( + 255. * (l * rgb_diff[0] - f2 * rgb2.red + f1 * rgb1.red)); + data[1] = (unsigned char)round( + 255. * (l * rgb_diff[1] - f2 * rgb2.green + f1 * rgb1.green)); + data[0] = (unsigned char)round( + 255. * (l * rgb_diff[2] - f2 * rgb2.blue + f1 * rgb1.blue)); } } } @@ -746,15 +704,14 @@ recolor(ZathuraRendererPrivate* priv, zathura_page_t* page, unsigned int page_wi cairo_surface_mark_dirty(surface); } -static bool -invoke_completed_signal(render_job_t* job, cairo_surface_t* surface) -{ - emit_completed_signal_t* ecs = g_try_malloc0(sizeof(emit_completed_signal_t)); +static bool invoke_completed_signal(render_job_t *job, + cairo_surface_t *surface) { + emit_completed_signal_t *ecs = g_try_malloc0(sizeof(emit_completed_signal_t)); if (ecs == NULL) { return false; } - ecs->job = job; + ecs->job = job; ecs->surface = cairo_surface_reference(surface); /* emit signal from the main context, i.e. the main thread */ @@ -762,10 +719,11 @@ invoke_completed_signal(render_job_t* job, cairo_surface_t* surface) return true; } -static bool -render_to_cairo_surface(cairo_surface_t* surface, zathura_page_t* page, ZathuraRenderer* renderer, double real_scale) -{ - cairo_t* cairo = cairo_create(surface); +static bool render_to_cairo_surface(cairo_surface_t *surface, + zathura_page_t *page, + ZathuraRenderer *renderer, + double real_scale) { + cairo_t *cairo = cairo_create(surface); if (cairo == NULL) { return false; } @@ -790,30 +748,36 @@ render_to_cairo_surface(cairo_surface_t* surface, zathura_page_t* page, ZathuraR return err == ZATHURA_ERROR_OK; } -static bool -render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* renderer) -{ - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); - zathura_page_t* page = request_priv->page; +static bool render(render_job_t *job, ZathuraRenderRequest *request, + ZathuraRenderer *renderer) { + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(request); + zathura_page_t *page = request_priv->page; /* create cairo surface */ - unsigned int page_width = 0; + unsigned int page_width = 0; unsigned int page_height = 0; /* page size in points */ - zathura_document_t* document = zathura_page_get_document(page); + zathura_document_t *document = zathura_page_get_document(page); const double height = zathura_page_get_height(page); const double width = zathura_page_get_width(page); - zathura_device_factors_t device_factors = { 0 }; + // @debug + fprintf(stderr, "height %f\n", height); + fprintf(stderr, "width %f\n", width); + // @ + + zathura_device_factors_t device_factors = {0}; double real_scale = 1; if (request_priv->render_plain == false) { /* page size in user pixels based on document zoom: if PPI information is * correct, 100% zoom will result in 72 documents points per inch of screen * (i.e. document size on screen matching the physical paper size). */ - real_scale = page_calc_height_width(document, height, width, - &page_height, &page_width, false); + real_scale = page_calc_height_width(document, height, width, &page_height, + &page_width, false); device_factors = zathura_document_get_device_factors(document); page_width *= device_factors.x; @@ -826,12 +790,11 @@ render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* render cairo_format_t format; if (priv->recolor.enabled) { format = CAIRO_FORMAT_ARGB32; - } - else { + } else { format = CAIRO_FORMAT_RGB24; } - cairo_surface_t* surface = cairo_image_surface_create(format, - page_width, page_height); + cairo_surface_t *surface = + cairo_image_surface_create(format, page_width, page_height); if (surface == NULL) { return false; @@ -876,52 +839,52 @@ render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* render return true; } -static void -render_job(void* data, void* user_data) -{ - render_job_t* job = data; - ZathuraRenderRequest* request = job->request; - ZathuraRenderer* renderer = user_data; +static void render_job(void *data, void *user_data) { + render_job_t *job = data; + ZathuraRenderRequest *request = job->request; + ZathuraRenderer *renderer = user_data; g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); if (priv->about_to_close == true || job->aborted == true) { /* back out early */ remove_job_and_free(job); return; } - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(request); girara_debug("Rendering page %d ...", - zathura_page_get_index(request_priv->page) + 1); + zathura_page_get_index(request_priv->page) + 1); if (render(job, request, renderer) != true) { girara_error("Rendering failed (page %d)\n", - zathura_page_get_index(request_priv->page) + 1); + zathura_page_get_index(request_priv->page) + 1); remove_job_and_free(job); } } - -void -render_all(zathura_t* zathura) -{ +void render_all(zathura_t *zathura) { if (zathura == NULL || zathura->document == NULL) { return; } /* unmark all pages */ - const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document); + const unsigned int number_of_pages = + zathura_document_get_number_of_pages(zathura->document); for (unsigned int page_id = 0; page_id < number_of_pages; ++page_id) { - zathura_page_t* page = zathura_document_get_page(zathura->document, - page_id); + zathura_page_t *page = + zathura_document_get_page(zathura->document, page_id); unsigned int page_height = 0, page_width = 0; const double height = zathura_page_get_height(page); const double width = zathura_page_get_width(page); - page_calc_height_width(zathura->document, height, width, &page_height, &page_width, true); + page_calc_height_width(zathura->document, height, width, &page_height, + &page_width, true); - girara_debug("Queuing resize for page %u to %u x %u (%0.2f x %0.2f).", page_id, page_width, page_height, width, height); - GtkWidget* widget = zathura_page_get_widget(zathura, page); + girara_debug("Queuing resize for page %u to %u x %u (%0.2f x %0.2f).", + page_id, page_width, page_height, width, height); + GtkWidget *widget = zathura_page_get_widget(zathura, page); if (widget != NULL) { gtk_widget_set_size_request(widget, page_width, page_height); gtk_widget_queue_resize(widget); @@ -929,21 +892,23 @@ render_all(zathura_t* zathura) } } -static gint -render_thread_sort(gconstpointer a, gconstpointer b, gpointer UNUSED(data)) -{ +static gint render_thread_sort(gconstpointer a, gconstpointer b, + gpointer UNUSED(data)) { if (a == NULL || b == NULL) { return 0; } - const render_job_t* job_a = a; - const render_job_t* job_b = b; + const render_job_t *job_a = a; + const render_job_t *job_b = b; if (job_a->aborted == job_b->aborted) { - ZathuraRenderRequestPrivate* priv_a = zathura_render_request_get_instance_private(job_a->request); - ZathuraRenderRequestPrivate* priv_b = zathura_render_request_get_instance_private(job_b->request); + ZathuraRenderRequestPrivate *priv_a = + zathura_render_request_get_instance_private(job_a->request); + ZathuraRenderRequestPrivate *priv_b = + zathura_render_request_get_instance_private(job_b->request); - return priv_a->last_view_time < priv_b->last_view_time ? -1 : - (priv_a->last_view_time > priv_b->last_view_time ? 1 : 0); + return priv_a->last_view_time < priv_b->last_view_time + ? -1 + : (priv_a->last_view_time > priv_b->last_view_time ? 1 : 0); } /* sort aborted entries earlier so that they are thrown out of the queue */ @@ -952,11 +917,11 @@ render_thread_sort(gconstpointer a, gconstpointer b, gpointer UNUSED(data)) /* cache functions */ -static bool -page_cache_is_cached(ZathuraRenderer* renderer, unsigned int page_index) -{ +static bool page_cache_is_cached(ZathuraRenderer *renderer, + unsigned int page_index) { g_return_val_if_fail(renderer != NULL, false); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); if (priv->page_cache.num_cached_pages != 0) { for (size_t i = 0; i < priv->page_cache.size; ++i) { @@ -972,34 +937,33 @@ page_cache_is_cached(ZathuraRenderer* renderer, unsigned int page_index) return false; } -static int -find_request_by_page_index(const void* req, const void* data) -{ - ZathuraRenderRequest* request = (void*) req; - const unsigned int page_index = *((const int*)data); +static int find_request_by_page_index(const void *req, const void *data) { + ZathuraRenderRequest *request = (void *)req; + const unsigned int page_index = *((const int *)data); - ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate *priv = + zathura_render_request_get_instance_private(request); if (zathura_page_get_index(priv->page) == page_index) { return 0; } return 1; } -static ssize_t -page_cache_lru_invalidate(ZathuraRenderer* renderer) -{ +static ssize_t page_cache_lru_invalidate(ZathuraRenderer *renderer) { g_return_val_if_fail(renderer != NULL, -1); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); g_return_val_if_fail(priv->page_cache.size != 0, -1); ssize_t lru_index = 0; gint64 lru_view_time = G_MAXINT64; - ZathuraRenderRequest* request = NULL; + ZathuraRenderRequest *request = NULL; for (size_t i = 0; i < priv->page_cache.size; ++i) { - ZathuraRenderRequest* tmp_request = girara_list_find(priv->requests, - find_request_by_page_index, &priv->page_cache.cache[i]); + ZathuraRenderRequest *tmp_request = girara_list_find( + priv->requests, find_request_by_page_index, &priv->page_cache.cache[i]); g_return_val_if_fail(tmp_request != NULL, -1); - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(tmp_request); + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(tmp_request); if (request_priv->last_view_time < lru_view_time) { lru_view_time = request_priv->last_view_time; @@ -1008,51 +972,49 @@ page_cache_lru_invalidate(ZathuraRenderer* renderer) } } - ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate *request_priv = + zathura_render_request_get_instance_private(request); /* emit the signal */ g_signal_emit(request, request_signals[REQUEST_CACHE_INVALIDATED], 0); girara_debug("Invalidated page %d at cache index %zd", - zathura_page_get_index(request_priv->page) + 1, lru_index); + zathura_page_get_index(request_priv->page) + 1, lru_index); priv->page_cache.cache[lru_index] = -1; --priv->page_cache.num_cached_pages; return lru_index; } -static bool -page_cache_is_full(ZathuraRenderer* renderer, bool* result) -{ +static bool page_cache_is_full(ZathuraRenderer *renderer, bool *result) { g_return_val_if_fail(ZATHURA_IS_RENDERER(renderer) && result != NULL, false); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); *result = priv->page_cache.num_cached_pages == priv->page_cache.size; return true; } -static void -page_cache_invalidate_all(ZathuraRenderer* renderer) -{ +static void page_cache_invalidate_all(ZathuraRenderer *renderer) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); for (size_t i = 0; i < priv->page_cache.size; ++i) { priv->page_cache.cache[i] = -1; } priv->page_cache.num_cached_pages = 0; } -void -zathura_renderer_page_cache_add(ZathuraRenderer* renderer, - unsigned int page_index) -{ +void zathura_renderer_page_cache_add(ZathuraRenderer *renderer, + unsigned int page_index) { g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); if (page_cache_is_cached(renderer, page_index) == true) { return; } - ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate *priv = + zathura_renderer_get_instance_private(renderer); bool full = false; if (page_cache_is_full(renderer, &full) == false) { return; @@ -1068,30 +1030,28 @@ zathura_renderer_page_cache_add(ZathuraRenderer* renderer, } else { priv->page_cache.cache[priv->page_cache.num_cached_pages++] = page_index; girara_debug("Page %d is cached at cache index %zu", page_index + 1, - priv->page_cache.num_cached_pages - 1); + priv->page_cache.num_cached_pages - 1); } - ZathuraRenderRequest* request = girara_list_find(priv->requests, - find_request_by_page_index, &page_index); + ZathuraRenderRequest *request = + girara_list_find(priv->requests, find_request_by_page_index, &page_index); g_return_if_fail(request != NULL); g_signal_emit(request, request_signals[REQUEST_CACHE_ADDED], 0); } -void zathura_render_request_set_render_plain(ZathuraRenderRequest* request, - bool render_plain) -{ +void zathura_render_request_set_render_plain(ZathuraRenderRequest *request, + bool render_plain) { g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); - ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); - priv->render_plain =render_plain; + ZathuraRenderRequestPrivate *priv = + zathura_render_request_get_instance_private(request); + priv->render_plain = render_plain; } -bool -zathura_render_request_get_render_plain(ZathuraRenderRequest* request) -{ +bool zathura_render_request_get_render_plain(ZathuraRenderRequest *request) { g_return_val_if_fail(ZATHURA_IS_RENDER_REQUEST(request), false); - ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate *priv = + zathura_render_request_get_instance_private(request); return priv->render_plain; } - diff --git a/zathura/synctex.c b/zathura/synctex.c index fb442ed..9b5d68e 100644 --- a/zathura/synctex.c +++ b/zathura/synctex.c @@ -204,7 +204,7 @@ synctex_rectangles_from_position(const char* filename, const char* input_file, girara_list_t* hitlist_flat = flatten_rectangles(hitlist); girara_list_free(hitlist); - + return hitlist_flat; } #else diff --git a/zathura/zathura.c b/zathura/zathura.c index 4185ff1..a9ca282 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -1,75 +1,74 @@ /* SPDX-License-Identifier: Zlib */ #include -#include #include +#include #include +// @debug +#include #include -#include #include -#include #include #include +#include #include -#include +#include #include +#include #ifdef GDK_WINDOWING_WAYLAND #include #endif #ifdef G_OS_UNIX -#include #include +#include #endif #include "bookmarks.h" #include "callbacks.h" -#include "config.h" #include "commands.h" +#include "config.h" #ifdef WITH_SQLITE #include "database-sqlite.h" #endif -#include "database-plain.h" -#include "document.h" -#include "shortcuts.h" -#include "zathura.h" -#include "utils.h" -#include "marks.h" -#include "render.h" -#include "page.h" -#include "page-widget.h" -#include "plugin.h" #include "adjustment.h" -#include "dbus-interface.h" -#include "resources.h" -#include "synctex.h" #include "content-type.h" +#include "database-plain.h" +#include "dbus-interface.h" +#include "document.h" +#include "marks.h" +#include "page-widget.h" +#include "page.h" +#include "plugin.h" +#include "render.h" +#include "resources.h" +#include "shortcuts.h" +#include "synctex.h" +#include "utils.h" +#include "zathura.h" #ifdef WITH_SECCOMP #include "seccomp-filters.h" #endif typedef struct zathura_document_info_s { - zathura_t* zathura; - char* path; - char* password; + zathura_t *zathura; + char *path; + char *password; int page_number; - char* mode; - char* synctex; - char* search_string; + char *mode; + char *synctex; + char *search_string; } zathura_document_info_t; - static gboolean document_info_open(gpointer data); #ifdef G_OS_UNIX static gboolean zathura_signal_sigterm(gpointer data); #endif -static void -free_document_info(zathura_document_info_t* document_info) -{ +static void free_document_info(zathura_document_info_t *document_info) { if (document_info == NULL) { return; } @@ -83,10 +82,8 @@ free_document_info(zathura_document_info_t* document_info) } /* function implementation */ -zathura_t* -zathura_create(void) -{ - zathura_t* zathura = g_try_malloc0(sizeof(zathura_t)); +zathura_t *zathura_create(void) { + zathura_t *zathura = g_try_malloc0(sizeof(zathura_t)); if (zathura == NULL) { return NULL; } @@ -112,7 +109,8 @@ zathura_create(void) #ifdef G_OS_UNIX /* signal handler */ - zathura->signals.sigterm = g_unix_signal_add(SIGTERM, zathura_signal_sigterm, zathura); + zathura->signals.sigterm = + g_unix_signal_add(SIGTERM, zathura_signal_sigterm, zathura); #endif /* MIME type detection */ @@ -129,9 +127,7 @@ error_out: return NULL; } -static void -create_directories(zathura_t* zathura) -{ +static void create_directories(zathura_t *zathura) { static const unsigned int mode = 0700; if (g_mkdir_with_parents(zathura->config.data_dir, mode) == -1) { @@ -140,26 +136,25 @@ create_directories(zathura_t* zathura) } } -void -zathura_update_view_ppi(zathura_t* zathura) -{ +void zathura_update_view_ppi(zathura_t *zathura) { if (zathura == NULL) { return; } /* get view widget GdkMonitor */ - GdkWindow* window = gtk_widget_get_window(zathura->ui.session->gtk.view); // NULL if not realized + GdkWindow *window = gtk_widget_get_window( + zathura->ui.session->gtk.view); // NULL if not realized if (window == NULL) { return; } - GdkDisplay* display = gtk_widget_get_display(zathura->ui.session->gtk.view); + GdkDisplay *display = gtk_widget_get_display(zathura->ui.session->gtk.view); if (display == NULL) { return; } double ppi = 0.0; - GdkMonitor* monitor = gdk_display_get_monitor_at_window(display, window); + GdkMonitor *monitor = gdk_display_get_monitor_at_window(display, window); if (monitor == NULL) { return; } @@ -182,21 +177,24 @@ zathura_update_view_ppi(zathura_t* zathura) /* work around apparent bug in GDK: on Wayland, monitor geometry doesn't * return values in application pixels as documented, but in device pixels. * */ - if (GDK_IS_WAYLAND_DISPLAY(display)) - { + if (GDK_IS_WAYLAND_DISPLAY(display)) { /* not using the cached value for the scale factor here to avoid issues * if this function is called before the cached value is updated */ - const int device_factor = gtk_widget_get_scale_factor(zathura->ui.session->gtk.view); - girara_debug("on Wayland, correcting PPI for device scale factor = %d", device_factor); + const int device_factor = + gtk_widget_get_scale_factor(zathura->ui.session->gtk.view); + girara_debug("on Wayland, correcting PPI for device scale factor = %d", + device_factor); if (device_factor != 0) { ppi /= device_factor; } } #endif - const double current_ppi = zathura_document_get_viewport_ppi(zathura->document); + const double current_ppi = + zathura_document_get_viewport_ppi(zathura->document); if (fabs(ppi - current_ppi) > DBL_EPSILON) { - girara_debug("monitor width: %d mm, pixels: %d, ppi: %0.2f", width_mm, monitor_geom.width, ppi); + girara_debug("monitor width: %d mm, pixels: %d, ppi: %0.2f", width_mm, + monitor_geom.width, ppi); zathura_document_set_viewport_ppi(zathura->document, ppi); adjust_view(zathura); render_all(zathura); @@ -204,34 +202,33 @@ zathura_update_view_ppi(zathura_t* zathura) } } -static bool -init_ui(zathura_t* zathura) -{ +static bool init_ui(zathura_t *zathura) { if (girara_session_init(zathura->ui.session, "zathura") == false) { girara_error("Failed to initialize girara."); return false; } /* girara events */ - zathura->ui.session->events.buffer_changed = cb_buffer_changed; + zathura->ui.session->events.buffer_changed = cb_buffer_changed; zathura->ui.session->events.unknown_command = cb_unknown_command; /* zathura signals */ zathura->signals.refresh_view = g_signal_new( - "refresh-view", GTK_TYPE_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_POINTER); + "refresh-view", GTK_TYPE_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_POINTER); g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), "refresh-view", G_CALLBACK(cb_refresh_view), zathura); g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), - "notify::scale-factor", G_CALLBACK(cb_scale_factor), zathura); + "notify::scale-factor", G_CALLBACK(cb_scale_factor), + zathura); - g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), - "screen-changed", G_CALLBACK(cb_widget_screen_changed), zathura); + g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), "screen-changed", + G_CALLBACK(cb_widget_screen_changed), zathura); - g_signal_connect(G_OBJECT(zathura->ui.session->gtk.window), - "configure-event", G_CALLBACK(cb_widget_configured), zathura); + g_signal_connect(G_OBJECT(zathura->ui.session->gtk.window), "configure-event", + G_CALLBACK(cb_widget_configured), zathura); /* initialize the screen-changed handler to 0 (i.e. invalid) */ zathura->signals.monitors_changed_handler = 0; @@ -248,8 +245,8 @@ init_ui(zathura_t* zathura) g_signal_connect(G_OBJECT(zathura->ui.session->gtk.window), "size-allocate", G_CALLBACK(cb_view_resized), zathura); - GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment( - GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); + GtkAdjustment *hadjustment = gtk_scrolled_window_get_hadjustment( + GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); /* Connect hadjustment signals */ g_signal_connect(G_OBJECT(hadjustment), "value-changed", @@ -257,8 +254,8 @@ init_ui(zathura_t* zathura) g_signal_connect(G_OBJECT(hadjustment), "changed", G_CALLBACK(cb_view_hadjustment_changed), zathura); - GtkAdjustment* vadjustment = gtk_scrolled_window_get_vadjustment( - GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); + GtkAdjustment *vadjustment = gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); /* Connect vadjustment signals */ g_signal_connect(G_OBJECT(vadjustment), "value-changed", @@ -279,21 +276,21 @@ init_ui(zathura_t* zathura) /* statusbar */ zathura->ui.statusbar.file = - girara_statusbar_item_add(zathura->ui.session, TRUE, TRUE, TRUE, NULL); + girara_statusbar_item_add(zathura->ui.session, TRUE, TRUE, TRUE, NULL); if (zathura->ui.statusbar.file == NULL) { girara_error("Failed to create status bar item."); return false; } zathura->ui.statusbar.buffer = - girara_statusbar_item_add(zathura->ui.session, FALSE, FALSE, FALSE, NULL); + girara_statusbar_item_add(zathura->ui.session, FALSE, FALSE, FALSE, NULL); if (zathura->ui.statusbar.buffer == NULL) { girara_error("Failed to create status bar item."); return false; } zathura->ui.statusbar.page_number = - girara_statusbar_item_add(zathura->ui.session, FALSE, FALSE, FALSE, NULL); + girara_statusbar_item_add(zathura->ui.session, FALSE, FALSE, FALSE, NULL); if (zathura->ui.statusbar.page_number == NULL) { girara_error("Failed to create status bar item."); return false; @@ -309,42 +306,36 @@ init_ui(zathura_t* zathura) return true; } -static bool -init_css(zathura_t* zathura) -{ - GiraraTemplate* csstemplate = - girara_session_get_template(zathura->ui.session); +static bool init_css(zathura_t *zathura) { + GiraraTemplate *csstemplate = + girara_session_get_template(zathura->ui.session); static const char index_settings[][16] = { - "index-fg", - "index-bg", - "index-active-fg", - "index-active-bg" - }; + "index-fg", "index-bg", "index-active-fg", "index-active-bg"}; for (size_t s = 0; s < LENGTH(index_settings); ++s) { girara_template_add_variable(csstemplate, index_settings[s]); - char* tmp_value = NULL; - GdkRGBA rgba = {0, 0, 0, 0}; + char *tmp_value = NULL; + GdkRGBA rgba = {0, 0, 0, 0}; girara_setting_get(zathura->ui.session, index_settings[s], &tmp_value); if (tmp_value != NULL) { parse_color(&rgba, tmp_value); g_free(tmp_value); } - char* color = gdk_rgba_to_string(&rgba); + char *color = gdk_rgba_to_string(&rgba); girara_template_set_variable_value(csstemplate, index_settings[s], color); g_free(color); } - GResource* css_resource = zathura_resources_get_resource(); - GBytes* css_data = g_resource_lookup_data(css_resource, - "/org/pwmt/zathura/CSS/zathura.css_t", - G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); + GResource *css_resource = zathura_resources_get_resource(); + GBytes *css_data = g_resource_lookup_data( + css_resource, "/org/pwmt/zathura/CSS/zathura.css_t", + G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); if (css_data != NULL) { - char* css = g_strdup_printf("%s\n%s", girara_template_get_base(csstemplate), - (const char*) g_bytes_get_data(css_data, NULL)); + char *css = g_strdup_printf("%s\n%s", girara_template_get_base(csstemplate), + (const char *)g_bytes_get_data(css_data, NULL)); girara_template_set_base(csstemplate, css); g_free(css); g_bytes_unref(css_data); @@ -355,10 +346,8 @@ init_css(zathura_t* zathura) return true; } -static void -init_database(zathura_t* zathura) -{ - char* database = NULL; +static void init_database(zathura_t *zathura) { + char *database = NULL; girara_setting_get(zathura->ui.session, "database", &database); /* create zathura data directory if database enabled */ @@ -372,8 +361,8 @@ init_database(zathura_t* zathura) #ifdef WITH_SQLITE } else if (g_strcmp0(database, "sqlite") == 0) { 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); g_free(tmp); #endif @@ -383,43 +372,36 @@ init_database(zathura_t* zathura) if (zathura->database == NULL && g_strcmp0(database, "null") != 0) { girara_error( - "Unable to initialize database. Bookmarks won't be available."); - } - else { + "Unable to initialize database. Bookmarks won't be available."); + } else { g_object_set(G_OBJECT(zathura->ui.session->command_history), "io", zathura->database, NULL); } g_free(database); } -static void -init_jumplist(zathura_t* zathura) -{ +static void init_jumplist(zathura_t *zathura) { int jumplist_size = 20; girara_setting_get(zathura->ui.session, "jumplist-size", &jumplist_size); zathura->jumplist.max_size = jumplist_size < 0 ? 0 : jumplist_size; - zathura->jumplist.list = NULL; - zathura->jumplist.size = 0; - zathura->jumplist.cur = NULL; + zathura->jumplist.list = NULL; + zathura->jumplist.size = 0; + zathura->jumplist.cur = NULL; } -static void -init_shortcut_helpers(zathura_t* zathura) -{ +static void init_shortcut_helpers(zathura_t *zathura) { zathura->shortcut.mouse.x = 0; zathura->shortcut.mouse.y = 0; zathura->shortcut.toggle_page_mode.pages = 2; - zathura->shortcut.toggle_presentation_mode.pages = 1; + zathura->shortcut.toggle_presentation_mode.pages = 1; zathura->shortcut.toggle_presentation_mode.first_page_column_list = NULL; - zathura->shortcut.toggle_presentation_mode.zoom = 1.0; + zathura->shortcut.toggle_presentation_mode.zoom = 1.0; } -bool -zathura_init(zathura_t* zathura) -{ +bool zathura_init(zathura_t *zathura) { if (zathura == NULL) { return false; } @@ -437,25 +419,25 @@ zathura_init(zathura_t* zathura) #ifdef WITH_SECCOMP /* initialize seccomp filters */ switch (zathura->global.sandbox) { - case ZATHURA_SANDBOX_NONE: - girara_debug("Sandbox deactivated."); - break; - case ZATHURA_SANDBOX_NORMAL: - girara_debug("Basic sandbox allowing normal operation."); - if (seccomp_enable_basic_filter() != 0) { - girara_error("Failed to initialize basic seccomp filter."); - goto error_free; - } - break; - case ZATHURA_SANDBOX_STRICT: - girara_debug("Strict sandbox preventing write and network access."); - if (seccomp_enable_strict_filter() != 0) { - girara_error("Failed to initialize strict seccomp filter."); - goto error_free; - } - /* unset the input method to avoid communication with external services */ - unsetenv("GTK_IM_MODULE"); - break; + case ZATHURA_SANDBOX_NONE: + girara_debug("Sandbox deactivated."); + break; + case ZATHURA_SANDBOX_NORMAL: + girara_debug("Basic sandbox allowing normal operation."); + if (seccomp_enable_basic_filter() != 0) { + girara_error("Failed to initialize basic seccomp filter."); + goto error_free; + } + break; + case ZATHURA_SANDBOX_STRICT: + girara_debug("Strict sandbox preventing write and network access."); + if (seccomp_enable_strict_filter() != 0) { + girara_error("Failed to initialize strict seccomp filter."); + goto error_free; + } + /* unset the input method to avoid communication with external services */ + unsetenv("GTK_IM_MODULE"); + break; } #endif @@ -466,15 +448,15 @@ zathura_init(zathura_t* zathura) } /* disable unsupported features in strict sandbox mode */ - if (zathura->global.sandbox != ZATHURA_SANDBOX_STRICT){ + if (zathura->global.sandbox != ZATHURA_SANDBOX_STRICT) { /* database */ init_database(zathura); } /* bookmarks */ zathura->bookmarks.bookmarks = girara_sorted_list_new2( - (girara_compare_function_t)zathura_bookmarks_compare, - (girara_free_function_t)zathura_bookmark_free); + (girara_compare_function_t)zathura_bookmarks_compare, + (girara_free_function_t)zathura_bookmark_free); /* jumplist */ init_jumplist(zathura); @@ -506,9 +488,7 @@ error_free: return false; } -void -zathura_free(zathura_t* zathura) -{ +void zathura_free(zathura_t *zathura) { if (zathura == NULL) { return; } @@ -533,7 +513,8 @@ zathura_free(zathura_t* zathura) } /* shortcut */ - if (zathura->shortcut.toggle_presentation_mode.first_page_column_list != NULL) { + if (zathura->shortcut.toggle_presentation_mode.first_page_column_list != + NULL) { g_free(zathura->shortcut.toggle_presentation_mode.first_page_column_list); } @@ -573,76 +554,62 @@ zathura_free(zathura_t* zathura) g_free(zathura); } -void -zathura_set_xid(zathura_t* zathura, Window xid) -{ +void zathura_set_xid(zathura_t *zathura, Window xid) { g_return_if_fail(zathura != NULL); zathura->ui.session->gtk.embed = xid; } -void -zathura_set_config_dir(zathura_t* zathura, const char* dir) -{ +void zathura_set_config_dir(zathura_t *zathura, const char *dir) { g_return_if_fail(zathura != NULL); if (dir != NULL) { zathura->config.config_dir = g_strdup(dir); } else { - gchar* path = girara_get_xdg_path(XDG_CONFIG); + gchar *path = girara_get_xdg_path(XDG_CONFIG); zathura->config.config_dir = g_build_filename(path, "zathura", NULL); g_free(path); } } -void -zathura_set_data_dir(zathura_t* zathura, const char* dir) -{ +void zathura_set_data_dir(zathura_t *zathura, const char *dir) { g_return_if_fail(zathura != NULL); if (dir != NULL) { zathura->config.data_dir = g_strdup(dir); } else { - gchar* path = girara_get_xdg_path(XDG_DATA); + gchar *path = girara_get_xdg_path(XDG_DATA); zathura->config.data_dir = g_build_filename(path, "zathura", NULL); g_free(path); } } -void -zathura_set_cache_dir(zathura_t* zathura, const char* dir) -{ +void zathura_set_cache_dir(zathura_t *zathura, const char *dir) { g_return_if_fail(zathura != NULL); if (dir != NULL) { zathura->config.cache_dir = g_strdup(dir); } else { - gchar* path = girara_get_xdg_path(XDG_CACHE); + gchar *path = girara_get_xdg_path(XDG_CACHE); zathura->config.cache_dir = g_build_filename(path, "zathura", NULL); g_free(path); } } -static void -add_dir(void* data, void* userdata) -{ - const char* path = data; - zathura_plugin_manager_t* plugin_manager = userdata; +static void add_dir(void *data, void *userdata) { + const char *path = data; + zathura_plugin_manager_t *plugin_manager = userdata; zathura_plugin_manager_add_dir(plugin_manager, path); } -static void -set_plugin_dir(zathura_t* zathura, const char* dir) -{ - girara_list_t* paths = girara_split_path_array(dir); +static void set_plugin_dir(zathura_t *zathura, const char *dir) { + girara_list_t *paths = girara_split_path_array(dir); girara_list_foreach(paths, add_dir, zathura->plugins.manager); girara_list_free(paths); } -void -zathura_set_plugin_dir(zathura_t* zathura, const char* dir) -{ +void zathura_set_plugin_dir(zathura_t *zathura, const char *dir) { g_return_if_fail(zathura != NULL); g_return_if_fail(zathura->plugins.manager != NULL); @@ -657,38 +624,35 @@ zathura_set_plugin_dir(zathura_t* zathura, const char* dir) } } -void -zathura_set_argv(zathura_t* zathura, char** argv) -{ +void zathura_set_argv(zathura_t *zathura, char **argv) { g_return_if_fail(zathura != NULL); zathura->global.arguments = argv; } -static bool -setup_renderer(zathura_t* zathura, zathura_document_t* document) -{ - /* page cache size */ +static bool setup_renderer(zathura_t *zathura, zathura_document_t *document) { + /* page cache size */ int cache_size = 0; girara_setting_get(zathura->ui.session, "page-cache-size", &cache_size); if (cache_size <= 0) { girara_warning("page-cache-size is not positive, using %d instead", - ZATHURA_PAGE_CACHE_DEFAULT_SIZE); + ZATHURA_PAGE_CACHE_DEFAULT_SIZE); cache_size = ZATHURA_PAGE_CACHE_DEFAULT_SIZE; } girara_debug("starting renderer with cache size %d", cache_size); - ZathuraRenderer* renderer = zathura_renderer_new(cache_size); + ZathuraRenderer *renderer = zathura_renderer_new(cache_size); if (renderer == NULL) { return false; } /* set up recolor info in ZathuraRenderer */ - char* recolor_dark = NULL; - char* recolor_light = NULL; + char *recolor_dark = NULL; + char *recolor_light = NULL; girara_setting_get(zathura->ui.session, "recolor-darkcolor", &recolor_dark); girara_setting_get(zathura->ui.session, "recolor-lightcolor", &recolor_light); - zathura_renderer_set_recolor_colors_str(renderer, recolor_light, recolor_dark); + zathura_renderer_set_recolor_colors_str(renderer, recolor_light, + recolor_dark); g_free(recolor_dark); g_free(recolor_light); @@ -707,8 +671,10 @@ setup_renderer(zathura_t* zathura, zathura_document_t* document) girara_setting_get(zathura->ui.session, "window-icon-document", &window_icon); if (window_icon == true) { girara_debug("starting render request for window icon"); - ZathuraRenderRequest* request = zathura_render_request_new(renderer, zathura_document_get_page(document, 0)); - g_signal_connect(request, "completed", G_CALLBACK(cb_window_update_icon), zathura); + ZathuraRenderRequest *request = zathura_render_request_new( + renderer, zathura_document_get_page(document, 0)); + g_signal_connect(request, "completed", G_CALLBACK(cb_window_update_icon), + zathura); zathura_render_request_set_render_plain(request, true); zathura_render_request(request, 0); zathura->window_icon_render_request = request; @@ -718,19 +684,17 @@ setup_renderer(zathura_t* zathura, zathura_document_t* document) } #ifdef G_OS_UNIX -static gchar* -prepare_document_open_from_stdin(const char* path) -{ +static gchar *prepare_document_open_from_stdin(const char *path) { int infileno = -1; if (g_strcmp0(path, "-") == 0) { infileno = fileno(stdin); } else if (g_str_has_prefix(path, "/proc/self/fd/") == true) { - char* begin = g_strrstr(path, "/") + 1; + char *begin = g_strrstr(path, "/") + 1; gint64 temp = g_ascii_strtoll(begin, NULL, 0); if (temp > INT_MAX || temp < 0) { return NULL; } - infileno = (int) temp; + infileno = (int)temp; } else { return NULL; } @@ -740,16 +704,15 @@ prepare_document_open_from_stdin(const char* path) return NULL; } - GInputStream* input_stream = g_unix_input_stream_new(infileno, false); + GInputStream *input_stream = g_unix_input_stream_new(infileno, false); if (input_stream == NULL) { girara_error("Can not read from file descriptor."); return NULL; - } - GFileIOStream* iostream = NULL; - GError* error = NULL; - GFile* tmpfile = g_file_new_tmp("zathura.stdin.XXXXXX", &iostream, &error); + GFileIOStream *iostream = NULL; + GError *error = NULL; + GFile *tmpfile = g_file_new_tmp("zathura.stdin.XXXXXX", &iostream, &error); if (tmpfile == NULL) { if (error != NULL) { girara_error("Can not create temporary file: %s", error->message); @@ -760,8 +723,8 @@ prepare_document_open_from_stdin(const char* path) } const ssize_t count = g_output_stream_splice( - g_io_stream_get_output_stream(G_IO_STREAM(iostream)), input_stream, - G_OUTPUT_STREAM_SPLICE_NONE, NULL, &error); + g_io_stream_get_output_stream(G_IO_STREAM(iostream)), input_stream, + G_OUTPUT_STREAM_SPLICE_NONE, NULL, &error); g_object_unref(input_stream); g_object_unref(iostream); if (count == -1) { @@ -774,21 +737,19 @@ prepare_document_open_from_stdin(const char* path) return NULL; } - char* file = g_file_get_path(tmpfile); + char *file = g_file_get_path(tmpfile); g_object_unref(tmpfile); return file; } #endif -static gchar* -prepare_document_open_from_gfile(GFile* source) -{ - gchar* file = NULL; - GFileIOStream* iostream = NULL; - GError* error = NULL; +static gchar *prepare_document_open_from_gfile(GFile *source) { + gchar *file = NULL; + GFileIOStream *iostream = NULL; + GError *error = NULL; - GFile* tmpfile = g_file_new_tmp("zathura.gio.XXXXXX", &iostream, &error); + GFile *tmpfile = g_file_new_tmp("zathura.gio.XXXXXX", &iostream, &error); if (tmpfile == NULL) { if (error != NULL) { girara_error("Can not create temporary file: %s", error->message); @@ -816,15 +777,13 @@ prepare_document_open_from_gfile(GFile* source) return file; } -static gboolean -document_info_open(gpointer data) -{ - zathura_document_info_t* document_info = data; +static gboolean document_info_open(gpointer data) { + zathura_document_info_t *document_info = data; g_return_val_if_fail(document_info != NULL, FALSE); - char* uri = NULL; + char *uri = NULL; if (document_info->zathura != NULL && document_info->path != NULL) { - char* file = NULL; + char *file = NULL; if (g_strcmp0(document_info->path, "-") == 0 || g_str_has_prefix(document_info->path, "/proc/self/fd/") == true) { #ifdef G_OS_UNIX @@ -832,27 +791,31 @@ document_info_open(gpointer data) #endif if (file == NULL) { 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 { document_info->zathura->stdin_support.file = g_strdup(file); } } else { /* expand ~ and ~user in paths if present */ - char* tmp_path = *document_info->path == '~' ? girara_fix_path(document_info->path) : NULL; - GFile* gf = g_file_new_for_commandline_arg(tmp_path != NULL ? tmp_path : document_info->path); + char *tmp_path = *document_info->path == '~' + ? girara_fix_path(document_info->path) + : NULL; + GFile *gf = g_file_new_for_commandline_arg( + tmp_path != NULL ? tmp_path : document_info->path); g_free(tmp_path); if (g_file_is_native(gf) == TRUE) { /* file was given as a native path */ file = g_file_get_path(gf); - } - else { + } else { /* copy file with GIO */ uri = g_file_get_uri(gf); file = prepare_document_open_from_gfile(gf); if (file == NULL) { girara_notify(document_info->zathura->ui.session, GIRARA_ERROR, - _("Could not read file from GIO and copy it to a temporary file.")); + _("Could not read file from GIO and copy it to a " + "temporary file.")); } else { document_info->zathura->stdin_support.file = g_strdup(file); } @@ -865,8 +828,8 @@ document_info_open(gpointer data) document_open_synctex(document_info->zathura, file, uri, document_info->password, document_info->synctex); } else { - document_open(document_info->zathura, file, uri, document_info->password, - document_info->page_number); + document_open(document_info->zathura, file, uri, + document_info->password, document_info->page_number); } g_free(file); g_free(uri); @@ -887,8 +850,8 @@ document_info_open(gpointer data) girara_argument_t search_arg; search_arg.n = 1; // Forward search search_arg.data = NULL; - cmd_search(document_info->zathura->ui.session, document_info->search_string, - &search_arg); + cmd_search(document_info->zathura->ui.session, + document_info->search_string, &search_arg); } } } @@ -897,38 +860,39 @@ document_info_open(gpointer data) return FALSE; } -char* -get_formatted_filename(zathura_t* zathura, bool statusbar) -{ +char *get_formatted_filename(zathura_t *zathura, bool statusbar) { bool basename_only = false; - const char* file_path = zathura_document_get_uri(zathura->document); + const char *file_path = zathura_document_get_uri(zathura->document); if (file_path == NULL) { file_path = zathura_document_get_path(zathura->document); } if (statusbar == true) { - girara_setting_get(zathura->ui.session, "statusbar-basename", &basename_only); + girara_setting_get(zathura->ui.session, "statusbar-basename", + &basename_only); } else { - girara_setting_get(zathura->ui.session, "window-title-basename", &basename_only); + girara_setting_get(zathura->ui.session, "window-title-basename", + &basename_only); } if (basename_only == false) { bool home_tilde = false; if (statusbar) { - girara_setting_get(zathura->ui.session, "statusbar-home-tilde", &home_tilde); + girara_setting_get(zathura->ui.session, "statusbar-home-tilde", + &home_tilde); } else { - girara_setting_get(zathura->ui.session, "window-title-home-tilde", &home_tilde); + girara_setting_get(zathura->ui.session, "window-title-home-tilde", + &home_tilde); } const size_t file_path_len = file_path ? strlen(file_path) : 0; if (home_tilde == true) { - char* home = girara_get_home_directory(NULL); + char *home = girara_get_home_directory(NULL); const size_t home_len = home ? strlen(home) : 0; - if (home_len > 1 - && file_path_len >= home_len - && g_str_has_prefix(file_path, home) - && (!file_path[home_len] || file_path[home_len] == '/')) { + if (home_len > 1 && file_path_len >= home_len && + g_str_has_prefix(file_path, home) && + (!file_path[home_len] || file_path[home_len] == '/')) { g_free(home); return g_strdup_printf("~%s", &file_path[home_len]); } else { @@ -939,47 +903,46 @@ get_formatted_filename(zathura_t* zathura, bool statusbar) return g_strdup(file_path); } } else { - const char* basename = zathura_document_get_basename(zathura->document); + const char *basename = zathura_document_get_basename(zathura->document); return g_strdup(basename); } } -static gboolean -document_open_password_dialog(gpointer data) -{ - zathura_password_dialog_info_t* password_dialog_info = data; +static gboolean document_open_password_dialog(gpointer data) { + zathura_password_dialog_info_t *password_dialog_info = data; - girara_dialog(password_dialog_info->zathura->ui.session, _("Enter password:"), true, NULL, - cb_password_dialog, password_dialog_info); + girara_dialog(password_dialog_info->zathura->ui.session, _("Enter password:"), + true, NULL, cb_password_dialog, password_dialog_info); return FALSE; } -bool -document_open(zathura_t* zathura, const char* path, const char* uri, const char* password, - int page_number) -{ +bool document_open(zathura_t *zathura, const char *path, const char *uri, + const char *password, int page_number) { if (zathura == NULL || zathura->plugins.manager == NULL || path == NULL) { goto error_out; } - /* FIXME: since there are many call chains leading here, check again if we need to expand ~ or - * ~user. We should fix all call sites instead */ - char* tmp_path = *path == '~' ? girara_fix_path(path) : NULL; + /* FIXME: since there are many call chains leading here, check again if we + * need to expand ~ or ~user. We should fix all call sites instead */ + char *tmp_path = *path == '~' ? girara_fix_path(path) : NULL; zathura_error_t error = ZATHURA_ERROR_OK; - zathura_document_t* document = zathura_document_open(zathura, tmp_path != NULL ? tmp_path : path, uri, password, &error); + zathura_document_t *document = zathura_document_open( + zathura, tmp_path != NULL ? tmp_path : path, uri, password, &error); g_free(tmp_path); if (document == NULL) { if (error == ZATHURA_ERROR_INVALID_PASSWORD) { girara_debug("Invalid or no password."); - zathura_password_dialog_info_t* password_dialog_info = malloc(sizeof(zathura_password_dialog_info_t)); + zathura_password_dialog_info_t *password_dialog_info = + malloc(sizeof(zathura_password_dialog_info_t)); if (password_dialog_info != NULL) { password_dialog_info->zathura = zathura; password_dialog_info->path = g_strdup(path); password_dialog_info->uri = g_strdup(uri); if (password_dialog_info->path != NULL) { - gdk_threads_add_idle(document_open_password_dialog, password_dialog_info); + gdk_threads_add_idle(document_open_password_dialog, + password_dialog_info); goto error_out; } else { free(password_dialog_info); @@ -987,39 +950,40 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* } goto error_out; } - if (error == ZATHURA_ERROR_OK ) { - girara_notify(zathura->ui.session, GIRARA_ERROR, _("Unsupported file type. Please install the necessary plugin.")); + if (error == ZATHURA_ERROR_OK) { + girara_notify( + zathura->ui.session, GIRARA_ERROR, + _("Unsupported file type. Please install the necessary plugin.")); } goto error_out; } - const char* file_path = zathura_document_get_path(document); + const char *file_path = zathura_document_get_path(document); unsigned int number_of_pages = zathura_document_get_number_of_pages(document); if (number_of_pages == 0) { girara_notify(zathura->ui.session, GIRARA_WARNING, - _("Document does not contain any pages")); + _("Document does not contain any pages")); goto error_free; } zathura->document = document; /* read history file */ - zathura_fileinfo_t file_info = { - .current_page = 0, - .page_offset = 0, - .zoom = 1, - .rotation = 0, - .pages_per_row = 0, - .first_page_column_list = NULL, - .page_right_to_left = false, - .position_x = 0, - .position_y = 0 - }; + zathura_fileinfo_t file_info = {.current_page = 0, + .page_offset = 0, + .zoom = 1, + .rotation = 0, + .pages_per_row = 0, + .first_page_column_list = NULL, + .page_right_to_left = false, + .position_x = 0, + .position_y = 0}; bool known_file = false; if (zathura->database != NULL) { - const uint8_t* file_hash = zathura_document_get_hash(document); - known_file = zathura_db_get_fileinfo(zathura->database, file_path, file_hash, &file_info); + const uint8_t *file_hash = zathura_document_get_hash(document); + known_file = zathura_db_get_fileinfo(zathura->database, file_path, + file_hash, &file_info); } /* set page offset */ @@ -1029,8 +993,8 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* if (file_info.zoom <= DBL_EPSILON) { file_info.zoom = 1; } - zathura_document_set_zoom(document, - zathura_correct_zoom_value(zathura->ui.session, file_info.zoom)); + zathura_document_set_zoom(document, zathura_correct_zoom_value( + zathura->ui.session, file_info.zoom)); /* check current page number */ /* if it wasn't specified on the command-line, get it from file_info */ @@ -1055,14 +1019,17 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* /* jump to first page if setting enabled */ bool always_first_page = false; - girara_setting_get(zathura->ui.session, "open-first-page", &always_first_page); + girara_setting_get(zathura->ui.session, "open-first-page", + &always_first_page); if (always_first_page == true) { zathura_document_set_current_page_number(document, 0); } /* apply open adjustment */ - char* adjust_open = "best-fit"; - if (known_file == false && girara_setting_get(zathura->ui.session, "adjust-open", &(adjust_open)) == true) { + char *adjust_open = "best-fit"; + if (known_file == false && + girara_setting_get(zathura->ui.session, "adjust-open", &(adjust_open)) == + true) { if (g_strcmp0(adjust_open, "best-fit") == 0) { zathura_document_set_adjust_mode(document, ZATHURA_ADJUST_BESTFIT); } else if (g_strcmp0(adjust_open, "width") == 0) { @@ -1077,18 +1044,21 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* /* initialize bisect state */ zathura->bisect.start = 0; - zathura->bisect.last_jump = zathura_document_get_current_page_number(document); + zathura->bisect.last_jump = + zathura_document_get_current_page_number(document); zathura->bisect.end = number_of_pages - 1; /* update statusbar */ - char* filename = get_formatted_filename(zathura, true); - girara_statusbar_item_set_text(zathura->ui.session, zathura->ui.statusbar.file, filename); + char *filename = get_formatted_filename(zathura, true); + girara_statusbar_item_set_text(zathura->ui.session, + zathura->ui.statusbar.file, filename); g_free(filename); /* install file monitor */ if (zathura->file_monitor.monitor == NULL) { - char* filemonitor_backend = NULL; - girara_setting_get(zathura->ui.session, "filemonitor", &filemonitor_backend); + char *filemonitor_backend = NULL; + girara_setting_get(zathura->ui.session, "filemonitor", + &filemonitor_backend); zathura_filemonitor_type_t type = ZATHURA_FILEMONITOR_GLIB; if (g_strcmp0(filemonitor_backend, "noop") == 0) { type = ZATHURA_FILEMONITOR_NOOP; @@ -1120,7 +1090,7 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* } /* create marks list */ - zathura->global.marks = girara_list_new2((girara_free_function_t) mark_free); + zathura->global.marks = girara_list_new2((girara_free_function_t)mark_free); if (zathura->global.marks == NULL) { goto error_free; } @@ -1131,38 +1101,60 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* } /* get view port size */ - GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment( - GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); - GtkAdjustment* vadjustment = gtk_scrolled_window_get_vadjustment( - GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); + GtkAdjustment *hadjustment = gtk_scrolled_window_get_hadjustment( + GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); + GtkAdjustment *vadjustment = gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); - const unsigned int view_width = floor(gtk_adjustment_get_page_size(hadjustment)); + const unsigned int view_width = + floor(gtk_adjustment_get_page_size(hadjustment)); zathura_document_set_viewport_width(zathura->document, view_width); - const unsigned int view_height = floor(gtk_adjustment_get_page_size(vadjustment)); + const unsigned int view_height = + floor(gtk_adjustment_get_page_size(vadjustment)); zathura_document_set_viewport_height(zathura->document, view_height); + // @debug + /* unsigned int h, w; */ + /* zathura_document_get_viewport_size(zathura->document, &h, &w); */ + /* fprintf(stderr, "view_width: %d\n", h); */ + /* fprintf(stderr, "view_height: %d\n", w); */ + /* zathura_document_set_viewport_width(zathura->document, 1000); */ + /* zathura_document_set_viewport_height(zathura->document, 1000); */ + /* zathura_document_get_viewport_size(zathura->document, &h, &w); */ + /* fprintf(stderr, "view_width: %d\n", h); */ + /* fprintf(stderr, "view_height: %d\n", w); */ + zathura_update_view_ppi(zathura); - /* call screen-changed callback to connect monitors-changed signal on initial screen */ + /* call screen-changed callback to connect monitors-changed signal on initial + * screen */ cb_widget_screen_changed(zathura->ui.session->gtk.view, NULL, zathura); /* get initial device scale */ - const int device_factor = gtk_widget_get_scale_factor(zathura->ui.session->gtk.view); - zathura_document_set_device_factors(zathura->document, device_factor, device_factor); + const int device_factor = + gtk_widget_get_scale_factor(zathura->ui.session->gtk.view); + zathura_document_set_device_factors(zathura->document, device_factor, + device_factor); /* create blank pages */ - zathura->pages = calloc(number_of_pages, sizeof(GtkWidget*)); + zathura->pages = calloc(number_of_pages, sizeof(GtkWidget *)); if (zathura->pages == NULL) { goto error_free; } for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) { - zathura_page_t* page = zathura_document_get_page(document, page_id); + zathura_page_t *page = zathura_document_get_page(document, page_id); if (page == NULL) { goto error_free; } - GtkWidget* page_widget = zathura_page_widget_new(zathura, page); + // @debug + fprintf(stderr, "page %d\n", page_id); + fprintf(stderr, "page.wdith %f\n", zathura_page_get_width(page)); + fprintf(stderr, "page.height %f\n", zathura_page_get_height(page)); + fprintf(stderr, "-\n"); + + GtkWidget *page_widget = zathura_page_widget_new(zathura, page); if (page_widget == NULL) { goto error_free; } @@ -1174,24 +1166,26 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* gtk_widget_set_valign(page_widget, GTK_ALIGN_CENTER); g_signal_connect(G_OBJECT(page_widget), "text-selected", - G_CALLBACK(cb_page_widget_text_selected), zathura); + G_CALLBACK(cb_page_widget_text_selected), zathura); g_signal_connect(G_OBJECT(page_widget), "image-selected", - G_CALLBACK(cb_page_widget_image_selected), zathura); + G_CALLBACK(cb_page_widget_image_selected), zathura); g_signal_connect(G_OBJECT(page_widget), "enter-link", - G_CALLBACK(cb_page_widget_link), (gpointer) true); + G_CALLBACK(cb_page_widget_link), (gpointer) true); g_signal_connect(G_OBJECT(page_widget), "leave-link", - G_CALLBACK(cb_page_widget_link), (gpointer) false); + G_CALLBACK(cb_page_widget_link), (gpointer) false); g_signal_connect(G_OBJECT(page_widget), "scaled-button-release", - G_CALLBACK(cb_page_widget_scaled_button_release), zathura); + G_CALLBACK(cb_page_widget_scaled_button_release), zathura); } /* view mode */ unsigned int pages_per_row = 1; - char* first_page_column_list = NULL; + char *first_page_column_list = NULL; unsigned int page_padding = 1; bool page_right_to_left = false; girara_setting_get(zathura->ui.session, "page-padding", &page_padding); + // @debug + fprintf(stderr, "page padding %d\n", page_padding); if (file_info.pages_per_row > 0) { pages_per_row = file_info.pages_per_row; @@ -1200,25 +1194,38 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* } /* read first_page_column list */ - if (file_info.first_page_column_list != NULL && *file_info.first_page_column_list != '\0') { + if (file_info.first_page_column_list != NULL && + *file_info.first_page_column_list != '\0') { first_page_column_list = file_info.first_page_column_list; file_info.first_page_column_list = NULL; } else { - girara_setting_get(zathura->ui.session, "first-page-column", &first_page_column_list); + girara_setting_get(zathura->ui.session, "first-page-column", + &first_page_column_list); } /* find value for first_page_column */ - unsigned int first_page_column = find_first_page_column(first_page_column_list, pages_per_row); + unsigned int first_page_column = + find_first_page_column(first_page_column_list, pages_per_row); girara_setting_set(zathura->ui.session, "pages-per-row", &pages_per_row); - girara_setting_set(zathura->ui.session, "first-page-column", first_page_column_list); + girara_setting_set(zathura->ui.session, "first-page-column", + first_page_column_list); g_free(file_info.first_page_column_list); g_free(first_page_column_list); page_right_to_left = file_info.page_right_to_left; - page_widget_set_mode(zathura, page_padding, pages_per_row, first_page_column, page_right_to_left); - zathura_document_set_page_layout(zathura->document, page_padding, pages_per_row, first_page_column); + page_widget_set_mode(zathura, page_padding, pages_per_row, first_page_column, + page_right_to_left); + + // @debug + fprintf(stderr, "page_per_row: %d\n", pages_per_row); + fprintf(stderr, "first_page_column: %d\n", first_page_column); + page_widget_set_mode(zathura, page_padding, pages_per_row, first_page_column, + true); + + zathura_document_set_page_layout(zathura->document, page_padding, + pages_per_row, first_page_column); girara_set_view(zathura->ui.session, zathura->ui.page_widget); @@ -1235,7 +1242,7 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* } /* update title */ - char* formatted_filename = get_formatted_filename(zathura, false); + char *formatted_filename = get_formatted_filename(zathura, false); girara_set_window_title(zathura->ui.session, formatted_filename); g_free(formatted_filename); @@ -1243,17 +1250,23 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* adjust_view(zathura); for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) { /* set widget size */ - zathura_page_t* page = zathura_document_get_page(document, page_id); + zathura_page_t *page = zathura_document_get_page(document, page_id); unsigned int page_height = 0; - unsigned int page_width = 0; + unsigned int page_width = 0; /* adjust_view calls render_all in some cases and render_all calls * gtk_widget_set_size_request. To be sure that it's really called, do it * here once again. */ const double height = zathura_page_get_height(page); const double width = zathura_page_get_width(page); - page_calc_height_width(zathura->document, height, width, &page_height, &page_width, true); - gtk_widget_set_size_request(zathura->pages[page_id], page_width, page_height); + // @debug + fprintf(stderr, "height in z: %f\n", height); + fprintf(stderr, "width in z: %f\n", width); + + page_calc_height_width(zathura->document, height, width, &page_height, + &page_width, true); + gtk_widget_set_size_request(zathura->pages[page_id], page_width, + page_height); /* show widget */ gtk_widget_show(zathura->pages[page_id]); @@ -1263,7 +1276,8 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char* page_set(zathura, zathura_document_get_current_page_number(document)); /* Set position (only if restoring from history file) */ - if (file_info.current_page == zathura_document_get_current_page_number(document) && + if (file_info.current_page == + zathura_document_get_current_page_number(document) && (file_info.position_x != 0 || file_info.position_y != 0)) { position_set(zathura, file_info.position_x, file_info.position_y); } @@ -1281,10 +1295,9 @@ error_out: return false; } -bool -document_open_synctex(zathura_t* zathura, const char* path, const char* uri, - const char* password, const char* synctex) -{ +bool document_open_synctex(zathura_t *zathura, const char *path, + const char *uri, const char *password, + const char *synctex) { bool ret = document_open(zathura, path, password, uri, ZATHURA_PAGE_NUMBER_UNSPECIFIED); if (ret == false) { @@ -1296,7 +1309,7 @@ document_open_synctex(zathura_t* zathura, const char* path, const char* uri, int line = 0; int column = 0; - char* input_file = NULL; + char *input_file = NULL; if (synctex_parse_input(synctex, &input_file, &line, &column) == false) { return false; } @@ -1306,30 +1319,29 @@ document_open_synctex(zathura_t* zathura, const char* path, const char* uri, return ret; } -void -document_open_idle(zathura_t* zathura, const char* path, const char* password, - int page_number, const char* mode, const char* synctex, - const char *search_string) -{ +void document_open_idle(zathura_t *zathura, const char *path, + const char *password, int page_number, const char *mode, + const char *synctex, const char *search_string) { g_return_if_fail(zathura != NULL); g_return_if_fail(path != NULL); - zathura_document_info_t* document_info = g_try_malloc0(sizeof(zathura_document_info_t)); + zathura_document_info_t *document_info = + g_try_malloc0(sizeof(zathura_document_info_t)); if (document_info == NULL) { return; } - document_info->zathura = zathura; - document_info->path = g_strdup(path); + document_info->zathura = zathura; + document_info->path = g_strdup(path); if (password != NULL) { - document_info->password = g_strdup(password); + document_info->password = g_strdup(password); } document_info->page_number = page_number; if (mode != NULL) { - document_info->mode = g_strdup(mode); + document_info->mode = g_strdup(mode); } if (synctex != NULL) { - document_info->synctex = g_strdup(synctex); + document_info->synctex = g_strdup(synctex); } if (search_string != NULL) { document_info->search_string = g_strdup(search_string); @@ -1338,58 +1350,56 @@ document_open_idle(zathura_t* zathura, const char* path, const char* password, gdk_threads_add_idle(document_info_open, document_info); } -bool -document_save(zathura_t* zathura, const char* path, bool overwrite) -{ +bool document_save(zathura_t *zathura, const char *path, bool overwrite) { g_return_val_if_fail(zathura, false); g_return_val_if_fail(zathura->document, false); g_return_val_if_fail(path, false); - gchar* file_path = girara_fix_path(path); + gchar *file_path = girara_fix_path(path); /* 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; + char *basename = + g_path_get_basename(zathura_document_get_path(zathura->document)); + char *tmp = file_path; file_path = g_build_filename(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); return false; } - zathura_error_t error = zathura_document_save_as(zathura->document, file_path); + zathura_error_t error = + zathura_document_save_as(zathura->document, file_path); g_free(file_path); return (error == ZATHURA_ERROR_OK) ? true : false; } -static void -remove_page_from_table(GtkWidget* page, gpointer UNUSED(permanent)) -{ +static void remove_page_from_table(GtkWidget *page, + gpointer UNUSED(permanent)) { gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(page)), page); } -static void -save_fileinfo_to_db(zathura_t* zathura) -{ - const char* path = zathura_document_get_path(zathura->document); - const uint8_t* file_hash = zathura_document_get_hash(zathura->document); +static void save_fileinfo_to_db(zathura_t *zathura) { + const char *path = zathura_document_get_path(zathura->document); + const uint8_t *file_hash = zathura_document_get_hash(zathura->document); zathura_fileinfo_t file_info = { - .current_page = zathura_document_get_current_page_number(zathura->document), - .page_offset = zathura_document_get_page_offset(zathura->document), - .zoom = zathura_document_get_zoom(zathura->document), - .rotation = zathura_document_get_rotation(zathura->document), - .pages_per_row = 1, - .first_page_column_list = "1:2", - .page_right_to_left = false, - .position_x = zathura_document_get_position_x(zathura->document), - .position_y = zathura_document_get_position_y(zathura->document) - }; + .current_page = + zathura_document_get_current_page_number(zathura->document), + .page_offset = zathura_document_get_page_offset(zathura->document), + .zoom = zathura_document_get_zoom(zathura->document), + .rotation = zathura_document_get_rotation(zathura->document), + .pages_per_row = 1, + .first_page_column_list = "1:2", + .page_right_to_left = false, + .position_x = zathura_document_get_position_x(zathura->document), + .position_y = zathura_document_get_position_y(zathura->document)}; girara_setting_get(zathura->ui.session, "pages-per-row", &(file_info.pages_per_row)); @@ -1406,16 +1416,15 @@ save_fileinfo_to_db(zathura_t* zathura) g_free(file_info.first_page_column_list); } -bool -document_close(zathura_t* zathura, bool keep_monitor) -{ +bool document_close(zathura_t *zathura, bool keep_monitor) { if (zathura == NULL || zathura->document == NULL) { return false; } /* reset window icon */ - if (zathura->ui.session != NULL && zathura->window_icon_render_request != NULL) { - char* window_icon = NULL; + if (zathura->ui.session != NULL && + zathura->window_icon_render_request != NULL) { + char *window_icon = NULL; girara_setting_get(zathura->ui.session, "window-icon", &window_icon); girara_setting_set(zathura->ui.session, "window-icon", window_icon); g_free(window_icon); @@ -1457,8 +1466,10 @@ document_close(zathura_t* zathura, bool keep_monitor) g_clear_object(&zathura->sync.render_thread); /* remove widgets */ - gtk_container_foreach(GTK_CONTAINER(zathura->ui.page_widget), remove_page_from_table, NULL); - for (unsigned int i = 0; i < zathura_document_get_number_of_pages(zathura->document); i++) { + gtk_container_foreach(GTK_CONTAINER(zathura->ui.page_widget), + remove_page_from_table, NULL); + for (unsigned int i = 0; + i < zathura_document_get_number_of_pages(zathura->document); i++) { g_object_unref(zathura->pages[i]); } free(zathura->pages); @@ -1479,7 +1490,8 @@ document_close(zathura_t* zathura, bool keep_monitor) statusbar_page_number_update(zathura); if (zathura->ui.session != NULL && zathura->ui.statusbar.file != NULL) { - girara_statusbar_item_set_text(zathura->ui.session, zathura->ui.statusbar.file, _("[No name]")); + girara_statusbar_item_set_text(zathura->ui.session, + zathura->ui.statusbar.file, _("[No name]")); } /* update title */ @@ -1488,14 +1500,12 @@ document_close(zathura_t* zathura, bool keep_monitor) return true; } -bool -page_set(zathura_t* zathura, unsigned int page_id) -{ +bool page_set(zathura_t *zathura, unsigned int page_id) { if (zathura == NULL || zathura->document == NULL) { goto error_out; } - zathura_page_t* page = zathura_document_get_page(zathura->document, page_id); + zathura_page_t *page = zathura_document_get_page(zathura->document, page_id); if (page == NULL) { goto error_out; } @@ -1503,7 +1513,8 @@ page_set(zathura_t* zathura, unsigned int page_id) zathura_document_set_current_page_number(zathura->document, page_id); bool continuous_hist_save = false; - girara_setting_get(zathura->ui.session, "continuous-hist-save", &continuous_hist_save); + girara_setting_get(zathura->ui.session, "continuous-hist-save", + &continuous_hist_save); if (continuous_hist_save) { save_fileinfo_to_db(zathura); } @@ -1515,35 +1526,41 @@ error_out: return false; } -void -statusbar_page_number_update(zathura_t* zathura) -{ +void statusbar_page_number_update(zathura_t *zathura) { if (zathura == NULL || zathura->ui.statusbar.page_number == NULL) { return; } - 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 number_of_pages = + zathura_document_get_number_of_pages(zathura->document); + unsigned int current_page_number = + zathura_document_get_current_page_number(zathura->document); if (zathura->document != NULL) { - zathura_page_t* page = zathura_document_get_page(zathura->document, current_page_number); - char* page_label = zathura_page_get_label(page, NULL); + zathura_page_t *page = + zathura_document_get_page(zathura->document, current_page_number); + char *page_label = zathura_page_get_label(page, NULL); - char* page_number_text = NULL; + char *page_number_text = NULL; if (page_label != NULL) { - page_number_text = g_strdup_printf("[%s (%d/%d)]", page_label, current_page_number + 1, number_of_pages); + page_number_text = g_strdup_printf( + "[%s (%d/%d)]", page_label, current_page_number + 1, number_of_pages); g_free(page_label); } else { - page_number_text = g_strdup_printf("[%d/%d]", current_page_number + 1, number_of_pages); + page_number_text = + g_strdup_printf("[%d/%d]", current_page_number + 1, number_of_pages); } - girara_statusbar_item_set_text(zathura->ui.session, zathura->ui.statusbar.page_number, page_number_text); + girara_statusbar_item_set_text(zathura->ui.session, + zathura->ui.statusbar.page_number, + page_number_text); bool page_number_in_window_title = false; - girara_setting_get(zathura->ui.session, "window-title-page", &page_number_in_window_title); + girara_setting_get(zathura->ui.session, "window-title-page", + &page_number_in_window_title); if (page_number_in_window_title == true) { - char* filename = get_formatted_filename(zathura, false); - char* title = g_strdup_printf("%s %s", filename, page_number_text); + char *filename = get_formatted_filename(zathura, false); + char *title = g_strdup_printf("%s %s", filename, page_number_text); girara_set_window_title(zathura->ui.session, title); g_free(title); g_free(filename); @@ -1551,15 +1568,15 @@ statusbar_page_number_update(zathura_t* zathura) g_free(page_number_text); } else { - girara_statusbar_item_set_text(zathura->ui.session, zathura->ui.statusbar.page_number, ""); + girara_statusbar_item_set_text(zathura->ui.session, + zathura->ui.statusbar.page_number, ""); } } -void -page_widget_set_mode(zathura_t* zathura, unsigned int page_padding, - unsigned int pages_per_row, unsigned int first_page_column, - bool page_right_to_left) -{ +void page_widget_set_mode(zathura_t *zathura, unsigned int page_padding, + unsigned int pages_per_row, + unsigned int first_page_column, + bool page_right_to_left) { /* show at least one page */ if (pages_per_row == 0) { pages_per_row = 1; @@ -1577,9 +1594,11 @@ page_widget_set_mode(zathura_t* zathura, unsigned int page_padding, return; } - gtk_container_foreach(GTK_CONTAINER(zathura->ui.page_widget), remove_page_from_table, NULL); + gtk_container_foreach(GTK_CONTAINER(zathura->ui.page_widget), + remove_page_from_table, NULL); - 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); gtk_grid_set_row_spacing(GTK_GRID(zathura->ui.page_widget), page_padding); gtk_grid_set_column_spacing(GTK_GRID(zathura->ui.page_widget), page_padding); @@ -1588,26 +1607,29 @@ page_widget_set_mode(zathura_t* zathura, unsigned int page_padding, int x = (i + first_page_column - 1) % pages_per_row; int y = (i + first_page_column - 1) / pages_per_row; - GtkWidget* page_widget = zathura->pages[i]; + GtkWidget *page_widget = zathura->pages[i]; if (page_right_to_left) { x = pages_per_row - 1 - x; } + //@debug + fprintf(stderr, "x:: %d\n", x); + fprintf(stderr, "y:: %d\n", y); + gtk_grid_attach(GTK_GRID(zathura->ui.page_widget), page_widget, x, y, 1, 1); } gtk_widget_show_all(zathura->ui.page_widget); } -bool -position_set(zathura_t* zathura, double position_x, double position_y) -{ +bool position_set(zathura_t *zathura, double position_x, double position_y) { if (zathura == NULL || zathura->document == NULL) { return false; } double comppos_x, comppos_y; - const unsigned int page_id = zathura_document_get_current_page_number(zathura->document); + const unsigned int page_id = + zathura_document_get_current_page_number(zathura->document); bool vertical_center = false; girara_setting_get(zathura->ui.session, "vertical-center", &vertical_center); @@ -1615,14 +1637,17 @@ position_set(zathura_t* zathura, double position_x, double position_y) /* xalign = 0.5: center horizontally (with the page, not the document) */ if (vertical_center == true) { /* yalign = 0.5: center vertically */ - page_number_to_position(zathura->document, page_id, 0.5, 0.5, &comppos_x, &comppos_y); + page_number_to_position(zathura->document, page_id, 0.5, 0.5, &comppos_x, + &comppos_y); } else { /* yalign = 0.0: align page an viewport edges at the top */ - page_number_to_position(zathura->document, page_id, 0.5, 0.0, &comppos_x, &comppos_y); + page_number_to_position(zathura->document, page_id, 0.5, 0.0, &comppos_x, + &comppos_y); } /* automatic horizontal adjustment */ - zathura_adjust_mode_t adjust_mode = zathura_document_get_adjust_mode(zathura->document); + zathura_adjust_mode_t adjust_mode = + zathura_document_get_adjust_mode(zathura->document); /* negative position_x mean: use the computed value */ if (position_x < 0) { @@ -1632,9 +1657,8 @@ position_set(zathura_t* zathura, double position_x, double position_y) /* center horizontally */ if (adjust_mode == ZATHURA_ADJUST_BESTFIT || - adjust_mode == ZATHURA_ADJUST_WIDTH || - zoom_center == true) { - position_x = 0.5; + adjust_mode == ZATHURA_ADJUST_WIDTH || zoom_center == true) { + position_x = 0.5; } } @@ -1645,6 +1669,9 @@ position_set(zathura_t* zathura, double position_x, double position_y) /* set the position */ zathura_document_set_position_x(zathura->document, position_x); zathura_document_set_position_y(zathura->document, position_y); + //@debug + fprintf(stderr, "position x %f\n", position_x); + fprintf(stderr, "position y %f\n", position_y); /* trigger a 'change' event for both adjustments */ refresh_view(zathura); @@ -1652,26 +1679,23 @@ position_set(zathura_t* zathura, double position_x, double position_y) return true; } -void -refresh_view(zathura_t* zathura) -{ +void refresh_view(zathura_t *zathura) { g_return_if_fail(zathura != NULL); /* emit a custom refresh-view signal */ - g_signal_emit(zathura->ui.session->gtk.view, zathura->signals.refresh_view, - 0, zathura); + g_signal_emit(zathura->ui.session->gtk.view, zathura->signals.refresh_view, 0, + zathura); } -bool -adjust_view(zathura_t* zathura) -{ +bool adjust_view(zathura_t *zathura) { g_return_val_if_fail(zathura != NULL, false); if (zathura->ui.page_widget == NULL || zathura->document == NULL) { goto error_ret; } - zathura_adjust_mode_t adjust_mode = zathura_document_get_adjust_mode(zathura->document); + zathura_adjust_mode_t adjust_mode = + zathura_document_get_adjust_mode(zathura->document); if (adjust_mode == ZATHURA_ADJUST_NONE) { /* there is nothing todo */ goto error_ret; @@ -1682,10 +1706,13 @@ adjust_view(zathura_t* zathura) unsigned int view_height = 0, view_width = 0; zathura_document_get_cell_size(zathura->document, &cell_height, &cell_width); - zathura_document_get_document_size(zathura->document, &document_height, &document_width); - zathura_document_get_viewport_size(zathura->document, &view_height, &view_width); + zathura_document_get_document_size(zathura->document, &document_height, + &document_width); + zathura_document_get_viewport_size(zathura->document, &view_height, + &view_width); - if (view_height == 0 || view_width == 0 || cell_height == 0 || cell_width == 0 || document_width == 0) { + if (view_height == 0 || view_width == 0 || cell_height == 0 || + cell_width == 0 || document_width == 0) { goto error_ret; } @@ -1706,11 +1733,12 @@ adjust_view(zathura_t* zathura) /* save new zoom and recompute cell size */ zathura_document_set_zoom(zathura->document, newzoom); unsigned int new_cell_height = 0, new_cell_width = 0; - zathura_document_get_cell_size(zathura->document, &new_cell_height, &new_cell_width); + zathura_document_get_cell_size(zathura->document, &new_cell_height, + &new_cell_width); /* - * XXX requiring a larger difference apparently circumvents #94 for some users; this is not a - * proper fix + * XXX requiring a larger difference apparently circumvents #94 for some + * users; this is not a proper fix */ static const int min_change = 2; /* if the change in zoom changes page cell dimensions, render */ @@ -1728,11 +1756,9 @@ error_ret: } #ifdef G_OS_UNIX -static gboolean -zathura_signal_sigterm(gpointer data) -{ +static gboolean zathura_signal_sigterm(gpointer data) { if (data != NULL) { - zathura_t* zathura = data; + zathura_t *zathura = data; cb_destroy(NULL, zathura); } From 4a1f8eda833161e01244a99e9c9a99d9e3f5ebae Mon Sep 17 00:00:00 2001 From: Jimmy Date: Thu, 4 Feb 2021 16:30:17 -0800 Subject: [PATCH 02/12] fixed gap --- zathura/zathura.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/zathura/zathura.c b/zathura/zathura.c index a9ca282..00205a2 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -1142,15 +1142,28 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, goto error_free; } - for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) { + // @debug prev_height, prev_width + for (unsigned int page_id = 0, prev_height = 0, prev_width = 0, + begined = false; + page_id < number_of_pages; page_id++) { zathura_page_t *page = zathura_document_get_page(document, page_id); if (page == NULL) { goto error_free; } + // @debug + if (!begined) { + prev_width = zathura_page_get_width(page); + prev_height = zathura_page_get_height(page); + begined = true; + } else { + zathura_page_set_width(page, prev_width); + zathura_page_set_height(page, prev_height); + } + // @debug fprintf(stderr, "page %d\n", page_id); - fprintf(stderr, "page.wdith %f\n", zathura_page_get_width(page)); + fprintf(stderr, "page.width %f\n", zathura_page_get_width(page)); fprintf(stderr, "page.height %f\n", zathura_page_get_height(page)); fprintf(stderr, "-\n"); From 1c26554c23e0c498daa718555316eea23a0d35ea Mon Sep 17 00:00:00 2001 From: Jimmy Date: Thu, 4 Feb 2021 19:14:08 -0800 Subject: [PATCH 03/12] fixed weird sized, cleaned code --- zathura/adjustment.c | 3 -- zathura/document.c | 2 - zathura/render.c | 5 -- zathura/zathura.c | 107 +++++++++++++++++++++++-------------------- 4 files changed, 57 insertions(+), 60 deletions(-) diff --git a/zathura/adjustment.c b/zathura/adjustment.c index a8a99f6..5163d04 100644 --- a/zathura/adjustment.c +++ b/zathura/adjustment.c @@ -5,9 +5,6 @@ #include -// @debug -#include - double page_calc_height_width(zathura_document_t *document, double height, double width, unsigned int *page_height, unsigned int *page_width, bool rotate) { diff --git a/zathura/document.c b/zathura/document.c index bb98ba0..ffa6376 100644 --- a/zathura/document.c +++ b/zathura/document.c @@ -17,8 +17,6 @@ #include "plugin.h" #include "utils.h" #include "zathura.h" -// @debug -#include /** * Document diff --git a/zathura/render.c b/zathura/render.c index 5b97552..9f23c2b 100644 --- a/zathura/render.c +++ b/zathura/render.c @@ -765,11 +765,6 @@ static bool render(render_job_t *job, ZathuraRenderRequest *request, const double height = zathura_page_get_height(page); const double width = zathura_page_get_width(page); - // @debug - fprintf(stderr, "height %f\n", height); - fprintf(stderr, "width %f\n", width); - // @ - zathura_device_factors_t device_factors = {0}; double real_scale = 1; if (request_priv->render_plain == false) { diff --git a/zathura/zathura.c b/zathura/zathura.c index 00205a2..b576d06 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -4,8 +4,6 @@ #include #include #include -// @debug -#include #include #include @@ -916,6 +914,56 @@ static gboolean document_open_password_dialog(gpointer data) { return FALSE; } +typedef struct sample_s { + double h; + double w; + unsigned int freq; +} sample_t; + +static int document_page_size_comp(const void *a, const void *b) { + return ((sample_t *)a)->freq - ((sample_t *)b)->freq; +} + +static void document_open_page_most_frequent_size(zathura_document_t *document, + unsigned int *width, + unsigned int *height) { + sample_t samples[32] = {{0}}; /* a max heap */ + unsigned int number_of_pages = zathura_document_get_number_of_pages(document); + unsigned int last_sample = (number_of_pages > 32) ? 32 : number_of_pages; + + for (int i = 0; i < 32; ++i) { + fprintf(stderr, "i: %d, w: %f, h: %f, freq: %d\n", i, samples[i].h, + samples[i].w, samples[i].freq); + } + + for (unsigned int page_id = 0; page_id < last_sample; page_id++) { + zathura_page_t *page = zathura_document_get_page(document, page_id); + double w = zathura_page_get_width(page), h = zathura_page_get_height(page); + unsigned int i = 0; + for (i = 0; i < last_sample; i++) { + if (samples[i].h == h && samples[i].w == w) { + samples[i].freq++; + break; + } + } + if (i == last_sample) { /* insert */ + samples[page_id].h = h; + samples[page_id].w = w; + samples[page_id].freq = 1; + } + } + + qsort((void *)samples, 32, sizeof(sample_t), document_page_size_comp); + + for (int i = 0; i < 32; ++i) { + fprintf(stderr, "i: %d, w: %f, h: %f, freq: %d\n", i, samples[i].h, + samples[i].w, samples[i].freq); + } + + *width = samples[31].w; + *height = samples[31].h; +} + bool document_open(zathura_t *zathura, const char *path, const char *uri, const char *password, int page_number) { if (zathura == NULL || zathura->plugins.manager == NULL || path == NULL) { @@ -1113,17 +1161,6 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, floor(gtk_adjustment_get_page_size(vadjustment)); zathura_document_set_viewport_height(zathura->document, view_height); - // @debug - /* unsigned int h, w; */ - /* zathura_document_get_viewport_size(zathura->document, &h, &w); */ - /* fprintf(stderr, "view_width: %d\n", h); */ - /* fprintf(stderr, "view_height: %d\n", w); */ - /* zathura_document_set_viewport_width(zathura->document, 1000); */ - /* zathura_document_set_viewport_height(zathura->document, 1000); */ - /* zathura_document_get_viewport_size(zathura->document, &h, &w); */ - /* fprintf(stderr, "view_width: %d\n", h); */ - /* fprintf(stderr, "view_height: %d\n", w); */ - zathura_update_view_ppi(zathura); /* call screen-changed callback to connect monitors-changed signal on initial @@ -1142,30 +1179,18 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, goto error_free; } - // @debug prev_height, prev_width - for (unsigned int page_id = 0, prev_height = 0, prev_width = 0, - begined = false; - page_id < number_of_pages; page_id++) { + unsigned int most_freq_width, most_freq_height; + document_open_page_most_frequent_size(document, &most_freq_width, + &most_freq_height); + + 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) { goto error_free; } - // @debug - if (!begined) { - prev_width = zathura_page_get_width(page); - prev_height = zathura_page_get_height(page); - begined = true; - } else { - zathura_page_set_width(page, prev_width); - zathura_page_set_height(page, prev_height); - } - - // @debug - fprintf(stderr, "page %d\n", page_id); - fprintf(stderr, "page.width %f\n", zathura_page_get_width(page)); - fprintf(stderr, "page.height %f\n", zathura_page_get_height(page)); - fprintf(stderr, "-\n"); + zathura_page_set_width(page, most_freq_width); + zathura_page_set_height(page, most_freq_height); GtkWidget *page_widget = zathura_page_widget_new(zathura, page); if (page_widget == NULL) { @@ -1197,8 +1222,6 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, bool page_right_to_left = false; girara_setting_get(zathura->ui.session, "page-padding", &page_padding); - // @debug - fprintf(stderr, "page padding %d\n", page_padding); if (file_info.pages_per_row > 0) { pages_per_row = file_info.pages_per_row; @@ -1231,12 +1254,6 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, page_widget_set_mode(zathura, page_padding, pages_per_row, first_page_column, page_right_to_left); - // @debug - fprintf(stderr, "page_per_row: %d\n", pages_per_row); - fprintf(stderr, "first_page_column: %d\n", first_page_column); - page_widget_set_mode(zathura, page_padding, pages_per_row, first_page_column, - true); - zathura_document_set_page_layout(zathura->document, page_padding, pages_per_row, first_page_column); @@ -1272,9 +1289,6 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, * here once again. */ const double height = zathura_page_get_height(page); const double width = zathura_page_get_width(page); - // @debug - fprintf(stderr, "height in z: %f\n", height); - fprintf(stderr, "width in z: %f\n", width); page_calc_height_width(zathura->document, height, width, &page_height, &page_width, true); @@ -1625,10 +1639,6 @@ void page_widget_set_mode(zathura_t *zathura, unsigned int page_padding, x = pages_per_row - 1 - x; } - //@debug - fprintf(stderr, "x:: %d\n", x); - fprintf(stderr, "y:: %d\n", y); - gtk_grid_attach(GTK_GRID(zathura->ui.page_widget), page_widget, x, y, 1, 1); } @@ -1682,9 +1692,6 @@ bool position_set(zathura_t *zathura, double position_x, double position_y) { /* set the position */ zathura_document_set_position_x(zathura->document, position_x); zathura_document_set_position_y(zathura->document, position_y); - //@debug - fprintf(stderr, "position x %f\n", position_x); - fprintf(stderr, "position y %f\n", position_y); /* trigger a 'change' event for both adjustments */ refresh_view(zathura); From 5ea8b4462eb5ef9be6c36fe005099d5316a9b0f2 Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Mon, 29 Nov 2021 15:31:57 +0100 Subject: [PATCH 04/12] Switching the girara repo, since the original seems inaccessible --- subprojects/girara.wrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/girara.wrap b/subprojects/girara.wrap index ebed93a..77603b6 100644 --- a/subprojects/girara.wrap +++ b/subprojects/girara.wrap @@ -1,4 +1,4 @@ [wrap-git] directory=girara -url=https://git.pwmt.org/pwmt/girara.git +url=https://github.com/pwmt/girara.git revision=develop From 6d66bc88af5c9c322b1f15974d0eceb67a7a73f8 Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Mon, 29 Nov 2021 19:12:45 +0100 Subject: [PATCH 05/12] Fixing the issue of the 'best-fit' zoom being way too low if one page is larger that the rest. The zoom was trying to accomodate for the large page, but it should instead accomodate for the most frequent size. This is still not ideal, since as it is now Zathura crops the larger pages to the size of the most frequent size, but this typically only affects things like larger first pages in scans. I am building this on thop of the Ailrk-fork, since that version already implemented a way how to estimate the most frequent page size, from the first 32 pages. --- zathura/document.c | 9 +++++++++ zathura/document.h | 12 ++++++++++++ zathura/zathura.c | 16 +++++++++------- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/zathura/document.c b/zathura/document.c index ffa6376..3e0e6e4 100644 --- a/zathura/document.c +++ b/zathura/document.c @@ -427,6 +427,7 @@ void zathura_document_set_zoom(zathura_document_t *document, double zoom) { return; } + /* fprintf(stderr, "orig_zoom: %f\t new_zoom: %f\n", document->zoom, zoom); */ document->zoom = zoom; } @@ -603,6 +604,14 @@ void zathura_document_get_document_size(zathura_document_t *document, *height = nrow * cell_height + (nrow - 1) * pad; } +void zathura_document_set_cell_size(zathura_document_t *document, + unsigned int cell_height, + unsigned int cell_width) { + document->cell_width = cell_width; + document->cell_height = cell_height; +} + + void zathura_document_set_page_layout(zathura_document_t *document, unsigned int page_padding, unsigned int pages_per_row, diff --git a/zathura/document.h b/zathura/document.h index 90c1c0f..f972f6f 100644 --- a/zathura/document.h +++ b/zathura/document.h @@ -328,6 +328,18 @@ ZATHURA_PLUGIN_API void zathura_document_get_cell_size(zathura_document_t* docum ZATHURA_PLUGIN_API void zathura_document_get_document_size(zathura_document_t* document, unsigned int* height, unsigned int* width); + +/** + * Sets the cell height and width of the document + * + * @param[in] document The document instance + * @param[in] cell_height The desired cell height + * @param[in] cell_width The desired cell width + */ +ZATHURA_PLUGIN_API void zathura_document_set_cell_size(zathura_document_t *document, + unsigned int cell_height, + unsigned int cell_width); + /** * Sets the layout of the pages in the document * diff --git a/zathura/zathura.c b/zathura/zathura.c index b576d06..8023c3e 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -931,11 +931,6 @@ static void document_open_page_most_frequent_size(zathura_document_t *document, unsigned int number_of_pages = zathura_document_get_number_of_pages(document); unsigned int last_sample = (number_of_pages > 32) ? 32 : number_of_pages; - for (int i = 0; i < 32; ++i) { - fprintf(stderr, "i: %d, w: %f, h: %f, freq: %d\n", i, samples[i].h, - samples[i].w, samples[i].freq); - } - for (unsigned int page_id = 0; page_id < last_sample; page_id++) { zathura_page_t *page = zathura_document_get_page(document, page_id); double w = zathura_page_get_width(page), h = zathura_page_get_height(page); @@ -956,8 +951,8 @@ static void document_open_page_most_frequent_size(zathura_document_t *document, qsort((void *)samples, 32, sizeof(sample_t), document_page_size_comp); for (int i = 0; i < 32; ++i) { - fprintf(stderr, "i: %d, w: %f, h: %f, freq: %d\n", i, samples[i].h, - samples[i].w, samples[i].freq); + /* fprintf(stderr, "i: %d, w: %f, h: %f, freq: %d\n", i, samples[i].h, + samples[i].w, samples[i].freq); */ } *width = samples[31].w; @@ -1189,6 +1184,10 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, goto error_free; } + unsigned int cell_height = 0, cell_width = 0; + zathura_document_get_cell_size(document, &cell_height, &cell_width); + /* fprintf(stderr, "new_cell_height: %d \t new_cell_width: %d\n", most_freq_height, most_freq_width); */ + zathura_document_set_cell_size(document, most_freq_height, most_freq_width); zathura_page_set_width(page, most_freq_width); zathura_page_set_height(page, most_freq_height); @@ -1741,6 +1740,9 @@ bool adjust_view(zathura_t *zathura) { double zoom = zathura_document_get_zoom(zathura->document); double newzoom = zoom; + /* fprintf(stderr, "cell_height: %d \t cell_width: %d \t page_ratio: %f\n", cell_height, cell_width, page_ratio); */ + /* fprintf(stderr, "view_height: %d \t view_width: %d \t view_ratio: %f\n", view_height, view_width, view_ratio); */ + if (adjust_mode == ZATHURA_ADJUST_WIDTH || (adjust_mode == ZATHURA_ADJUST_BESTFIT && page_ratio < view_ratio)) { newzoom *= (double)view_width / (double)document_width; From 33083ecf9f915483faeef3299688c58d49bbcdcf Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Wed, 1 Dec 2021 19:48:54 +0100 Subject: [PATCH 06/12] Fixed the whitespace difference from upstream in zathura.c. Praise VIM. --- zathura/zathura.c | 797 +++++++++++++++++++++++----------------------- 1 file changed, 405 insertions(+), 392 deletions(-) diff --git a/zathura/zathura.c b/zathura/zathura.c index 9a40665..ee8ceb4 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -1,72 +1,76 @@ /* SPDX-License-Identifier: Zlib */ #include -#include #include +#include #include #include +#include #include +#include #include #include -#include #include -#include -#include #include +#include #ifdef GDK_WINDOWING_WAYLAND #include #endif #ifdef G_OS_UNIX -#include #include +#include #endif #include "bookmarks.h" #include "callbacks.h" -#include "commands.h" #include "config.h" +#include "commands.h" #ifdef WITH_SQLITE #include "database-sqlite.h" #endif -#include "adjustment.h" -#include "content-type.h" #include "database-plain.h" -#include "dbus-interface.h" #include "document.h" -#include "marks.h" -#include "page-widget.h" -#include "page.h" -#include "plugin.h" -#include "render.h" -#include "resources.h" #include "shortcuts.h" -#include "synctex.h" -#include "utils.h" #include "zathura.h" +#include "utils.h" +#include "marks.h" +#include "render.h" +#include "page.h" +#include "page-widget.h" +#include "plugin.h" +#include "adjustment.h" +#include "dbus-interface.h" +#include "resources.h" +#include "synctex.h" +#include "content-type.h" #ifdef WITH_SECCOMP #include "seccomp-filters.h" #endif typedef struct zathura_document_info_s { - zathura_t *zathura; - char *path; - char *password; + zathura_t* zathura; + char* path; + char* password; int page_number; - char *mode; - char *synctex; - char *search_string; + char* mode; + char* synctex; + char* bookmark_name; + char* search_string; } zathura_document_info_t; + static gboolean document_info_open(gpointer data); #ifdef G_OS_UNIX static gboolean zathura_signal_sigterm(gpointer data); #endif -static void free_document_info(zathura_document_info_t *document_info) { +static void +free_document_info(zathura_document_info_t* document_info) +{ if (document_info == NULL) { return; } @@ -81,8 +85,10 @@ static void free_document_info(zathura_document_info_t *document_info) { } /* function implementation */ -zathura_t *zathura_create(void) { - zathura_t *zathura = g_try_malloc0(sizeof(zathura_t)); +zathura_t* +zathura_create(void) +{ + zathura_t* zathura = g_try_malloc0(sizeof(zathura_t)); if (zathura == NULL) { return NULL; } @@ -108,8 +114,7 @@ zathura_t *zathura_create(void) { #ifdef G_OS_UNIX /* signal handler */ - zathura->signals.sigterm = - g_unix_signal_add(SIGTERM, zathura_signal_sigterm, zathura); + zathura->signals.sigterm = g_unix_signal_add(SIGTERM, zathura_signal_sigterm, zathura); #endif /* MIME type detection */ @@ -126,7 +131,9 @@ error_out: return NULL; } -static void create_directories(zathura_t *zathura) { +static void +create_directories(zathura_t* zathura) +{ static const unsigned int mode = 0700; if (g_mkdir_with_parents(zathura->config.data_dir, mode) == -1) { @@ -135,25 +142,26 @@ static void create_directories(zathura_t *zathura) { } } -void zathura_update_view_ppi(zathura_t *zathura) { +void +zathura_update_view_ppi(zathura_t* zathura) +{ if (zathura == NULL) { return; } /* get view widget GdkMonitor */ - GdkWindow *window = gtk_widget_get_window( - zathura->ui.session->gtk.view); // NULL if not realized + GdkWindow* window = gtk_widget_get_window(zathura->ui.session->gtk.view); // NULL if not realized if (window == NULL) { return; } - GdkDisplay *display = gtk_widget_get_display(zathura->ui.session->gtk.view); + GdkDisplay* display = gtk_widget_get_display(zathura->ui.session->gtk.view); if (display == NULL) { return; } double ppi = 0.0; - GdkMonitor *monitor = gdk_display_get_monitor_at_window(display, window); + GdkMonitor* monitor = gdk_display_get_monitor_at_window(display, window); if (monitor == NULL) { return; } @@ -176,24 +184,21 @@ void zathura_update_view_ppi(zathura_t *zathura) { /* work around apparent bug in GDK: on Wayland, monitor geometry doesn't * return values in application pixels as documented, but in device pixels. * */ - if (GDK_IS_WAYLAND_DISPLAY(display)) { + if (GDK_IS_WAYLAND_DISPLAY(display)) + { /* not using the cached value for the scale factor here to avoid issues * if this function is called before the cached value is updated */ - const int device_factor = - gtk_widget_get_scale_factor(zathura->ui.session->gtk.view); - girara_debug("on Wayland, correcting PPI for device scale factor = %d", - device_factor); + const int device_factor = gtk_widget_get_scale_factor(zathura->ui.session->gtk.view); + girara_debug("on Wayland, correcting PPI for device scale factor = %d", device_factor); if (device_factor != 0) { ppi /= device_factor; } } #endif - const double current_ppi = - zathura_document_get_viewport_ppi(zathura->document); + const double current_ppi = zathura_document_get_viewport_ppi(zathura->document); if (fabs(ppi - current_ppi) > DBL_EPSILON) { - girara_debug("monitor width: %d mm, pixels: %d, ppi: %0.2f", width_mm, - monitor_geom.width, ppi); + girara_debug("monitor width: %d mm, pixels: %d, ppi: %0.2f", width_mm, monitor_geom.width, ppi); zathura_document_set_viewport_ppi(zathura->document, ppi); adjust_view(zathura); render_all(zathura); @@ -201,33 +206,34 @@ void zathura_update_view_ppi(zathura_t *zathura) { } } -static bool init_ui(zathura_t *zathura) { +static bool +init_ui(zathura_t* zathura) +{ if (girara_session_init(zathura->ui.session, "zathura") == false) { girara_error("Failed to initialize girara."); return false; } /* girara events */ - zathura->ui.session->events.buffer_changed = cb_buffer_changed; + zathura->ui.session->events.buffer_changed = cb_buffer_changed; zathura->ui.session->events.unknown_command = cb_unknown_command; /* zathura signals */ zathura->signals.refresh_view = g_signal_new( - "refresh-view", GTK_TYPE_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_POINTER); + "refresh-view", GTK_TYPE_WIDGET, G_SIGNAL_RUN_LAST, 0, NULL, NULL, + g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_POINTER); g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), "refresh-view", G_CALLBACK(cb_refresh_view), zathura); g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), - "notify::scale-factor", G_CALLBACK(cb_scale_factor), - zathura); + "notify::scale-factor", G_CALLBACK(cb_scale_factor), zathura); - g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), "screen-changed", - G_CALLBACK(cb_widget_screen_changed), zathura); + g_signal_connect(G_OBJECT(zathura->ui.session->gtk.view), + "screen-changed", G_CALLBACK(cb_widget_screen_changed), zathura); - g_signal_connect(G_OBJECT(zathura->ui.session->gtk.window), "configure-event", - G_CALLBACK(cb_widget_configured), zathura); + g_signal_connect(G_OBJECT(zathura->ui.session->gtk.window), + "configure-event", G_CALLBACK(cb_widget_configured), zathura); /* initialize the screen-changed handler to 0 (i.e. invalid) */ zathura->signals.monitors_changed_handler = 0; @@ -244,8 +250,8 @@ static bool init_ui(zathura_t *zathura) { g_signal_connect(G_OBJECT(zathura->ui.session->gtk.window), "size-allocate", G_CALLBACK(cb_view_resized), zathura); - GtkAdjustment *hadjustment = gtk_scrolled_window_get_hadjustment( - GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); + GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment( + GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); /* Connect hadjustment signals */ g_signal_connect(G_OBJECT(hadjustment), "value-changed", @@ -253,8 +259,8 @@ static bool init_ui(zathura_t *zathura) { g_signal_connect(G_OBJECT(hadjustment), "changed", G_CALLBACK(cb_view_hadjustment_changed), zathura); - GtkAdjustment *vadjustment = gtk_scrolled_window_get_vadjustment( - GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); + GtkAdjustment* vadjustment = gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); /* Connect vadjustment signals */ g_signal_connect(G_OBJECT(vadjustment), "value-changed", @@ -275,21 +281,21 @@ static bool init_ui(zathura_t *zathura) { /* statusbar */ zathura->ui.statusbar.file = - girara_statusbar_item_add(zathura->ui.session, TRUE, TRUE, TRUE, NULL); + girara_statusbar_item_add(zathura->ui.session, TRUE, TRUE, TRUE, NULL); if (zathura->ui.statusbar.file == NULL) { girara_error("Failed to create status bar item."); return false; } zathura->ui.statusbar.buffer = - girara_statusbar_item_add(zathura->ui.session, FALSE, FALSE, FALSE, NULL); + girara_statusbar_item_add(zathura->ui.session, FALSE, FALSE, FALSE, NULL); if (zathura->ui.statusbar.buffer == NULL) { girara_error("Failed to create status bar item."); return false; } zathura->ui.statusbar.page_number = - girara_statusbar_item_add(zathura->ui.session, FALSE, FALSE, FALSE, NULL); + girara_statusbar_item_add(zathura->ui.session, FALSE, FALSE, FALSE, NULL); if (zathura->ui.statusbar.page_number == NULL) { girara_error("Failed to create status bar item."); return false; @@ -305,36 +311,42 @@ static bool init_ui(zathura_t *zathura) { return true; } -static bool init_css(zathura_t *zathura) { - GiraraTemplate *csstemplate = - girara_session_get_template(zathura->ui.session); +static bool +init_css(zathura_t* zathura) +{ + GiraraTemplate* csstemplate = + girara_session_get_template(zathura->ui.session); static const char index_settings[][16] = { - "index-fg", "index-bg", "index-active-fg", "index-active-bg"}; + "index-fg", + "index-bg", + "index-active-fg", + "index-active-bg" + }; for (size_t s = 0; s < LENGTH(index_settings); ++s) { girara_template_add_variable(csstemplate, index_settings[s]); - char *tmp_value = NULL; - GdkRGBA rgba = {0, 0, 0, 0}; + char* tmp_value = NULL; + GdkRGBA rgba = {0, 0, 0, 0}; girara_setting_get(zathura->ui.session, index_settings[s], &tmp_value); if (tmp_value != NULL) { parse_color(&rgba, tmp_value); g_free(tmp_value); } - char *color = gdk_rgba_to_string(&rgba); + char* color = gdk_rgba_to_string(&rgba); girara_template_set_variable_value(csstemplate, index_settings[s], color); g_free(color); } - GResource *css_resource = zathura_resources_get_resource(); - GBytes *css_data = g_resource_lookup_data( - css_resource, "/org/pwmt/zathura/CSS/zathura.css_t", - G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); + GResource* css_resource = zathura_resources_get_resource(); + GBytes* css_data = g_resource_lookup_data(css_resource, + "/org/pwmt/zathura/CSS/zathura.css_t", + G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); if (css_data != NULL) { - char *css = g_strdup_printf("%s\n%s", girara_template_get_base(csstemplate), - (const char *)g_bytes_get_data(css_data, NULL)); + char* css = g_strdup_printf("%s\n%s", girara_template_get_base(csstemplate), + (const char*) g_bytes_get_data(css_data, NULL)); girara_template_set_base(csstemplate, css); g_free(css); g_bytes_unref(css_data); @@ -345,8 +357,10 @@ static bool init_css(zathura_t *zathura) { return true; } -static void init_database(zathura_t *zathura) { - char *database = NULL; +static void +init_database(zathura_t* zathura) +{ + char* database = NULL; girara_setting_get(zathura->ui.session, "database", &database); /* create zathura data directory if database enabled */ @@ -360,8 +374,8 @@ static void init_database(zathura_t *zathura) { #ifdef WITH_SQLITE } else if (g_strcmp0(database, "sqlite") == 0) { 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); g_free(tmp); #endif @@ -371,36 +385,43 @@ static void init_database(zathura_t *zathura) { if (zathura->database == NULL && g_strcmp0(database, "null") != 0) { girara_error( - "Unable to initialize database. Bookmarks won't be available."); - } else { + "Unable to initialize database. Bookmarks won't be available."); + } + else { g_object_set(G_OBJECT(zathura->ui.session->command_history), "io", zathura->database, NULL); } g_free(database); } -static void init_jumplist(zathura_t *zathura) { +static void +init_jumplist(zathura_t* zathura) +{ int jumplist_size = 20; girara_setting_get(zathura->ui.session, "jumplist-size", &jumplist_size); zathura->jumplist.max_size = jumplist_size < 0 ? 0 : jumplist_size; - zathura->jumplist.list = NULL; - zathura->jumplist.size = 0; - zathura->jumplist.cur = NULL; + zathura->jumplist.list = NULL; + zathura->jumplist.size = 0; + zathura->jumplist.cur = NULL; } -static void init_shortcut_helpers(zathura_t *zathura) { +static void +init_shortcut_helpers(zathura_t* zathura) +{ zathura->shortcut.mouse.x = 0; zathura->shortcut.mouse.y = 0; zathura->shortcut.toggle_page_mode.pages = 2; - zathura->shortcut.toggle_presentation_mode.pages = 1; + zathura->shortcut.toggle_presentation_mode.pages = 1; zathura->shortcut.toggle_presentation_mode.first_page_column_list = NULL; - zathura->shortcut.toggle_presentation_mode.zoom = 1.0; + zathura->shortcut.toggle_presentation_mode.zoom = 1.0; } -bool zathura_init(zathura_t *zathura) { +bool +zathura_init(zathura_t* zathura) +{ if (zathura == NULL) { return false; } @@ -418,25 +439,25 @@ bool zathura_init(zathura_t *zathura) { #ifdef WITH_SECCOMP /* initialize seccomp filters */ switch (zathura->global.sandbox) { - case ZATHURA_SANDBOX_NONE: - girara_debug("Sandbox deactivated."); - break; - case ZATHURA_SANDBOX_NORMAL: - girara_debug("Basic sandbox allowing normal operation."); - if (seccomp_enable_basic_filter() != 0) { - girara_error("Failed to initialize basic seccomp filter."); - goto error_free; - } - break; - case ZATHURA_SANDBOX_STRICT: - girara_debug("Strict sandbox preventing write and network access."); - if (seccomp_enable_strict_filter() != 0) { - girara_error("Failed to initialize strict seccomp filter."); - goto error_free; - } - /* unset the input method to avoid communication with external services */ - unsetenv("GTK_IM_MODULE"); - break; + case ZATHURA_SANDBOX_NONE: + girara_debug("Sandbox deactivated."); + break; + case ZATHURA_SANDBOX_NORMAL: + girara_debug("Basic sandbox allowing normal operation."); + if (seccomp_enable_basic_filter() != 0) { + girara_error("Failed to initialize basic seccomp filter."); + goto error_free; + } + break; + case ZATHURA_SANDBOX_STRICT: + girara_debug("Strict sandbox preventing write and network access."); + if (seccomp_enable_strict_filter() != 0) { + girara_error("Failed to initialize strict seccomp filter."); + goto error_free; + } + /* unset the input method to avoid communication with external services */ + unsetenv("GTK_IM_MODULE"); + break; } #endif @@ -447,15 +468,15 @@ bool zathura_init(zathura_t *zathura) { } /* disable unsupported features in strict sandbox mode */ - if (zathura->global.sandbox != ZATHURA_SANDBOX_STRICT) { + if (zathura->global.sandbox != ZATHURA_SANDBOX_STRICT){ /* database */ init_database(zathura); } /* bookmarks */ zathura->bookmarks.bookmarks = girara_sorted_list_new2( - (girara_compare_function_t)zathura_bookmarks_compare, - (girara_free_function_t)zathura_bookmark_free); + (girara_compare_function_t)zathura_bookmarks_compare, + (girara_free_function_t)zathura_bookmark_free); /* jumplist */ init_jumplist(zathura); @@ -487,7 +508,9 @@ error_free: return false; } -void zathura_free(zathura_t *zathura) { +void +zathura_free(zathura_t* zathura) +{ if (zathura == NULL) { return; } @@ -512,8 +535,7 @@ void zathura_free(zathura_t *zathura) { } /* shortcut */ - if (zathura->shortcut.toggle_presentation_mode.first_page_column_list != - NULL) { + if (zathura->shortcut.toggle_presentation_mode.first_page_column_list != NULL) { g_free(zathura->shortcut.toggle_presentation_mode.first_page_column_list); } @@ -553,62 +575,76 @@ void zathura_free(zathura_t *zathura) { g_free(zathura); } -void zathura_set_xid(zathura_t *zathura, Window xid) { +void +zathura_set_xid(zathura_t* zathura, Window xid) +{ g_return_if_fail(zathura != NULL); zathura->ui.session->gtk.embed = xid; } -void zathura_set_config_dir(zathura_t *zathura, const char *dir) { +void +zathura_set_config_dir(zathura_t* zathura, const char* dir) +{ g_return_if_fail(zathura != NULL); if (dir != NULL) { zathura->config.config_dir = g_strdup(dir); } else { - gchar *path = girara_get_xdg_path(XDG_CONFIG); + gchar* path = girara_get_xdg_path(XDG_CONFIG); zathura->config.config_dir = g_build_filename(path, "zathura", NULL); g_free(path); } } -void zathura_set_data_dir(zathura_t *zathura, const char *dir) { +void +zathura_set_data_dir(zathura_t* zathura, const char* dir) +{ g_return_if_fail(zathura != NULL); if (dir != NULL) { zathura->config.data_dir = g_strdup(dir); } else { - gchar *path = girara_get_xdg_path(XDG_DATA); + gchar* path = girara_get_xdg_path(XDG_DATA); zathura->config.data_dir = g_build_filename(path, "zathura", NULL); g_free(path); } } -void zathura_set_cache_dir(zathura_t *zathura, const char *dir) { +void +zathura_set_cache_dir(zathura_t* zathura, const char* dir) +{ g_return_if_fail(zathura != NULL); if (dir != NULL) { zathura->config.cache_dir = g_strdup(dir); } else { - gchar *path = girara_get_xdg_path(XDG_CACHE); + gchar* path = girara_get_xdg_path(XDG_CACHE); zathura->config.cache_dir = g_build_filename(path, "zathura", NULL); g_free(path); } } -static void add_dir(void *data, void *userdata) { - const char *path = data; - zathura_plugin_manager_t *plugin_manager = userdata; +static void +add_dir(void* data, void* userdata) +{ + const char* path = data; + zathura_plugin_manager_t* plugin_manager = userdata; zathura_plugin_manager_add_dir(plugin_manager, path); } -static void set_plugin_dir(zathura_t *zathura, const char *dir) { - girara_list_t *paths = girara_split_path_array(dir); +static void +set_plugin_dir(zathura_t* zathura, const char* dir) +{ + girara_list_t* paths = girara_split_path_array(dir); girara_list_foreach(paths, add_dir, zathura->plugins.manager); girara_list_free(paths); } -void zathura_set_plugin_dir(zathura_t *zathura, const char *dir) { +void +zathura_set_plugin_dir(zathura_t* zathura, const char* dir) +{ g_return_if_fail(zathura != NULL); g_return_if_fail(zathura->plugins.manager != NULL); @@ -623,35 +659,38 @@ void zathura_set_plugin_dir(zathura_t *zathura, const char *dir) { } } -void zathura_set_argv(zathura_t *zathura, char **argv) { +void +zathura_set_argv(zathura_t* zathura, char** argv) +{ g_return_if_fail(zathura != NULL); zathura->global.arguments = argv; } -static bool setup_renderer(zathura_t *zathura, zathura_document_t *document) { - /* page cache size */ +static bool +setup_renderer(zathura_t* zathura, zathura_document_t* document) +{ + /* page cache size */ int cache_size = 0; girara_setting_get(zathura->ui.session, "page-cache-size", &cache_size); if (cache_size <= 0) { girara_warning("page-cache-size is not positive, using %d instead", - ZATHURA_PAGE_CACHE_DEFAULT_SIZE); + ZATHURA_PAGE_CACHE_DEFAULT_SIZE); cache_size = ZATHURA_PAGE_CACHE_DEFAULT_SIZE; } girara_debug("starting renderer with cache size %d", cache_size); - ZathuraRenderer *renderer = zathura_renderer_new(cache_size); + ZathuraRenderer* renderer = zathura_renderer_new(cache_size); if (renderer == NULL) { return false; } /* set up recolor info in ZathuraRenderer */ - char *recolor_dark = NULL; - char *recolor_light = NULL; + char* recolor_dark = NULL; + char* recolor_light = NULL; girara_setting_get(zathura->ui.session, "recolor-darkcolor", &recolor_dark); girara_setting_get(zathura->ui.session, "recolor-lightcolor", &recolor_light); - zathura_renderer_set_recolor_colors_str(renderer, recolor_light, - recolor_dark); + zathura_renderer_set_recolor_colors_str(renderer, recolor_light, recolor_dark); g_free(recolor_dark); g_free(recolor_light); @@ -670,10 +709,8 @@ static bool setup_renderer(zathura_t *zathura, zathura_document_t *document) { girara_setting_get(zathura->ui.session, "window-icon-document", &window_icon); if (window_icon == true) { girara_debug("starting render request for window icon"); - ZathuraRenderRequest *request = zathura_render_request_new( - renderer, zathura_document_get_page(document, 0)); - g_signal_connect(request, "completed", G_CALLBACK(cb_window_update_icon), - zathura); + ZathuraRenderRequest* request = zathura_render_request_new(renderer, zathura_document_get_page(document, 0)); + g_signal_connect(request, "completed", G_CALLBACK(cb_window_update_icon), zathura); zathura_render_request_set_render_plain(request, true); zathura_render_request(request, 0); zathura->window_icon_render_request = request; @@ -683,17 +720,19 @@ static bool setup_renderer(zathura_t *zathura, zathura_document_t *document) { } #ifdef G_OS_UNIX -static gchar *prepare_document_open_from_stdin(const char *path) { +static gchar* +prepare_document_open_from_stdin(const char* path) +{ int infileno = -1; if (g_strcmp0(path, "-") == 0) { infileno = fileno(stdin); } else if (g_str_has_prefix(path, "/proc/self/fd/") == true) { - char *begin = g_strrstr(path, "/") + 1; + char* begin = g_strrstr(path, "/") + 1; gint64 temp = g_ascii_strtoll(begin, NULL, 0); if (temp > INT_MAX || temp < 0) { return NULL; } - infileno = (int)temp; + infileno = (int) temp; } else { return NULL; } @@ -703,15 +742,16 @@ static gchar *prepare_document_open_from_stdin(const char *path) { return NULL; } - GInputStream *input_stream = g_unix_input_stream_new(infileno, false); + GInputStream* input_stream = g_unix_input_stream_new(infileno, false); if (input_stream == NULL) { girara_error("Can not read from file descriptor."); return NULL; + } - GFileIOStream *iostream = NULL; - GError *error = NULL; - GFile *tmpfile = g_file_new_tmp("zathura.stdin.XXXXXX", &iostream, &error); + GFileIOStream* iostream = NULL; + GError* error = NULL; + GFile* tmpfile = g_file_new_tmp("zathura.stdin.XXXXXX", &iostream, &error); if (tmpfile == NULL) { if (error != NULL) { girara_error("Can not create temporary file: %s", error->message); @@ -722,8 +762,8 @@ static gchar *prepare_document_open_from_stdin(const char *path) { } const ssize_t count = g_output_stream_splice( - g_io_stream_get_output_stream(G_IO_STREAM(iostream)), input_stream, - G_OUTPUT_STREAM_SPLICE_NONE, NULL, &error); + g_io_stream_get_output_stream(G_IO_STREAM(iostream)), input_stream, + G_OUTPUT_STREAM_SPLICE_NONE, NULL, &error); g_object_unref(input_stream); g_object_unref(iostream); if (count == -1) { @@ -736,19 +776,21 @@ static gchar *prepare_document_open_from_stdin(const char *path) { return NULL; } - char *file = g_file_get_path(tmpfile); + char* file = g_file_get_path(tmpfile); g_object_unref(tmpfile); return file; } #endif -static gchar *prepare_document_open_from_gfile(GFile *source) { - gchar *file = NULL; - GFileIOStream *iostream = NULL; - GError *error = NULL; +static gchar* +prepare_document_open_from_gfile(GFile* source) +{ + gchar* file = NULL; + GFileIOStream* iostream = NULL; + GError* error = NULL; - GFile *tmpfile = g_file_new_tmp("zathura.gio.XXXXXX", &iostream, &error); + GFile* tmpfile = g_file_new_tmp("zathura.gio.XXXXXX", &iostream, &error); if (tmpfile == NULL) { if (error != NULL) { girara_error("Can not create temporary file: %s", error->message); @@ -776,13 +818,15 @@ static gchar *prepare_document_open_from_gfile(GFile *source) { return file; } -static gboolean document_info_open(gpointer data) { - zathura_document_info_t *document_info = data; +static gboolean +document_info_open(gpointer data) +{ + zathura_document_info_t* document_info = data; g_return_val_if_fail(document_info != NULL, FALSE); - char *uri = NULL; + char* uri = NULL; if (document_info->zathura != NULL && document_info->path != NULL) { - char *file = NULL; + char* file = NULL; if (g_strcmp0(document_info->path, "-") == 0 || g_str_has_prefix(document_info->path, "/proc/self/fd/") == true) { #ifdef G_OS_UNIX @@ -790,31 +834,27 @@ static gboolean document_info_open(gpointer data) { #endif if (file == NULL) { 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 { document_info->zathura->stdin_support.file = g_strdup(file); } } else { /* expand ~ and ~user in paths if present */ - char *tmp_path = *document_info->path == '~' - ? girara_fix_path(document_info->path) - : NULL; - GFile *gf = g_file_new_for_commandline_arg( - tmp_path != NULL ? tmp_path : document_info->path); + char* tmp_path = *document_info->path == '~' ? girara_fix_path(document_info->path) : NULL; + GFile* gf = g_file_new_for_commandline_arg(tmp_path != NULL ? tmp_path : document_info->path); g_free(tmp_path); if (g_file_is_native(gf) == TRUE) { /* file was given as a native path */ file = g_file_get_path(gf); - } else { + } + else { /* copy file with GIO */ uri = g_file_get_uri(gf); file = prepare_document_open_from_gfile(gf); if (file == NULL) { girara_notify(document_info->zathura->ui.session, GIRARA_ERROR, - _("Could not read file from GIO and copy it to a " - "temporary file.")); + _("Could not read file from GIO and copy it to a temporary file.")); } else { document_info->zathura->stdin_support.file = g_strdup(file); } @@ -827,8 +867,8 @@ static gboolean document_info_open(gpointer data) { document_open_synctex(document_info->zathura, file, uri, document_info->password, document_info->synctex); } else { - document_open(document_info->zathura, file, uri, - document_info->password, document_info->page_number); + document_open(document_info->zathura, file, uri, document_info->password, + document_info->page_number); } g_free(file); g_free(uri); @@ -856,8 +896,8 @@ static gboolean document_info_open(gpointer data) { girara_argument_t search_arg; search_arg.n = 1; // Forward search search_arg.data = NULL; - cmd_search(document_info->zathura->ui.session, - document_info->search_string, &search_arg); + cmd_search(document_info->zathura->ui.session, document_info->search_string, + &search_arg); } } } @@ -866,39 +906,38 @@ static gboolean document_info_open(gpointer data) { return FALSE; } -char *get_formatted_filename(zathura_t *zathura, bool statusbar) { +char* +get_formatted_filename(zathura_t* zathura, bool statusbar) +{ bool basename_only = false; - const char *file_path = zathura_document_get_uri(zathura->document); + const char* file_path = zathura_document_get_uri(zathura->document); if (file_path == NULL) { file_path = zathura_document_get_path(zathura->document); } if (statusbar == true) { - girara_setting_get(zathura->ui.session, "statusbar-basename", - &basename_only); + girara_setting_get(zathura->ui.session, "statusbar-basename", &basename_only); } else { - girara_setting_get(zathura->ui.session, "window-title-basename", - &basename_only); + girara_setting_get(zathura->ui.session, "window-title-basename", &basename_only); } if (basename_only == false) { bool home_tilde = false; if (statusbar) { - girara_setting_get(zathura->ui.session, "statusbar-home-tilde", - &home_tilde); + girara_setting_get(zathura->ui.session, "statusbar-home-tilde", &home_tilde); } else { - girara_setting_get(zathura->ui.session, "window-title-home-tilde", - &home_tilde); + girara_setting_get(zathura->ui.session, "window-title-home-tilde", &home_tilde); } const size_t file_path_len = file_path ? strlen(file_path) : 0; if (home_tilde == true) { - char *home = girara_get_home_directory(NULL); + char* home = girara_get_home_directory(NULL); const size_t home_len = home ? strlen(home) : 0; - if (home_len > 1 && file_path_len >= home_len && - g_str_has_prefix(file_path, home) && - (!file_path[home_len] || file_path[home_len] == '/')) { + if (home_len > 1 + && file_path_len >= home_len + && g_str_has_prefix(file_path, home) + && (!file_path[home_len] || file_path[home_len] == '/')) { g_free(home); return g_strdup_printf("~%s", &file_path[home_len]); } else { @@ -909,16 +948,18 @@ char *get_formatted_filename(zathura_t *zathura, bool statusbar) { return g_strdup(file_path); } } else { - const char *basename = zathura_document_get_basename(zathura->document); + const char* basename = zathura_document_get_basename(zathura->document); return g_strdup(basename); } } -static gboolean document_open_password_dialog(gpointer data) { - zathura_password_dialog_info_t *password_dialog_info = data; +static gboolean +document_open_password_dialog(gpointer data) +{ + zathura_password_dialog_info_t* password_dialog_info = data; - girara_dialog(password_dialog_info->zathura->ui.session, _("Enter password:"), - true, NULL, cb_password_dialog, password_dialog_info); + girara_dialog(password_dialog_info->zathura->ui.session, _("Enter password:"), true, NULL, + cb_password_dialog, password_dialog_info); return FALSE; } @@ -967,33 +1008,32 @@ static void document_open_page_most_frequent_size(zathura_document_t *document, *height = samples[31].h; } -bool document_open(zathura_t *zathura, const char *path, const char *uri, - const char *password, int page_number) { +bool +document_open(zathura_t* zathura, const char* path, const char* uri, const char* password, + int page_number) +{ if (zathura == NULL || zathura->plugins.manager == NULL || path == NULL) { goto error_out; } - /* FIXME: since there are many call chains leading here, check again if we - * need to expand ~ or ~user. We should fix all call sites instead */ - char *tmp_path = *path == '~' ? girara_fix_path(path) : NULL; + /* FIXME: since there are many call chains leading here, check again if we need to expand ~ or + * ~user. We should fix all call sites instead */ + char* tmp_path = *path == '~' ? girara_fix_path(path) : NULL; zathura_error_t error = ZATHURA_ERROR_OK; - zathura_document_t *document = zathura_document_open( - zathura, tmp_path != NULL ? tmp_path : path, uri, password, &error); + zathura_document_t* document = zathura_document_open(zathura, tmp_path != NULL ? tmp_path : path, uri, password, &error); g_free(tmp_path); if (document == NULL) { if (error == ZATHURA_ERROR_INVALID_PASSWORD) { girara_debug("Invalid or no password."); - zathura_password_dialog_info_t *password_dialog_info = - malloc(sizeof(zathura_password_dialog_info_t)); + zathura_password_dialog_info_t* password_dialog_info = malloc(sizeof(zathura_password_dialog_info_t)); if (password_dialog_info != NULL) { password_dialog_info->zathura = zathura; password_dialog_info->path = g_strdup(path); password_dialog_info->uri = g_strdup(uri); if (password_dialog_info->path != NULL) { - gdk_threads_add_idle(document_open_password_dialog, - password_dialog_info); + gdk_threads_add_idle(document_open_password_dialog, password_dialog_info); goto error_out; } else { free(password_dialog_info); @@ -1001,40 +1041,39 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, } goto error_out; } - if (error == ZATHURA_ERROR_OK) { - girara_notify( - zathura->ui.session, GIRARA_ERROR, - _("Unsupported file type. Please install the necessary plugin.")); + if (error == ZATHURA_ERROR_OK ) { + girara_notify(zathura->ui.session, GIRARA_ERROR, _("Unsupported file type. Please install the necessary plugin.")); } goto error_out; } - const char *file_path = zathura_document_get_path(document); + const char* file_path = zathura_document_get_path(document); unsigned int number_of_pages = zathura_document_get_number_of_pages(document); if (number_of_pages == 0) { girara_notify(zathura->ui.session, GIRARA_WARNING, - _("Document does not contain any pages")); + _("Document does not contain any pages")); goto error_free; } zathura->document = document; /* read history file */ - zathura_fileinfo_t file_info = {.current_page = 0, - .page_offset = 0, - .zoom = 1, - .rotation = 0, - .pages_per_row = 0, - .first_page_column_list = NULL, - .page_right_to_left = false, - .position_x = 0, - .position_y = 0}; + zathura_fileinfo_t file_info = { + .current_page = 0, + .page_offset = 0, + .zoom = 1, + .rotation = 0, + .pages_per_row = 0, + .first_page_column_list = NULL, + .page_right_to_left = false, + .position_x = 0, + .position_y = 0 + }; bool known_file = false; if (zathura->database != NULL) { - const uint8_t *file_hash = zathura_document_get_hash(document); - known_file = zathura_db_get_fileinfo(zathura->database, file_path, - file_hash, &file_info); + const uint8_t* file_hash = zathura_document_get_hash(document); + known_file = zathura_db_get_fileinfo(zathura->database, file_path, file_hash, &file_info); } /* set page offset */ @@ -1044,8 +1083,8 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, if (file_info.zoom <= DBL_EPSILON) { file_info.zoom = 1; } - zathura_document_set_zoom(document, zathura_correct_zoom_value( - zathura->ui.session, file_info.zoom)); + zathura_document_set_zoom(document, + zathura_correct_zoom_value(zathura->ui.session, file_info.zoom)); /* check current page number */ /* if it wasn't specified on the command-line, get it from file_info */ @@ -1070,17 +1109,14 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, /* jump to first page if setting enabled */ bool always_first_page = false; - girara_setting_get(zathura->ui.session, "open-first-page", - &always_first_page); + girara_setting_get(zathura->ui.session, "open-first-page", &always_first_page); if (always_first_page == true) { zathura_document_set_current_page_number(document, 0); } /* apply open adjustment */ - char *adjust_open = "best-fit"; - if (known_file == false && - girara_setting_get(zathura->ui.session, "adjust-open", &(adjust_open)) == - true) { + char* adjust_open = "best-fit"; + if (known_file == false && girara_setting_get(zathura->ui.session, "adjust-open", &(adjust_open)) == true) { if (g_strcmp0(adjust_open, "best-fit") == 0) { zathura_document_set_adjust_mode(document, ZATHURA_ADJUST_BESTFIT); } else if (g_strcmp0(adjust_open, "width") == 0) { @@ -1095,21 +1131,18 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, /* initialize bisect state */ zathura->bisect.start = 0; - zathura->bisect.last_jump = - zathura_document_get_current_page_number(document); + zathura->bisect.last_jump = zathura_document_get_current_page_number(document); zathura->bisect.end = number_of_pages - 1; /* update statusbar */ - char *filename = get_formatted_filename(zathura, true); - girara_statusbar_item_set_text(zathura->ui.session, - zathura->ui.statusbar.file, filename); + char* filename = get_formatted_filename(zathura, true); + girara_statusbar_item_set_text(zathura->ui.session, zathura->ui.statusbar.file, filename); g_free(filename); /* install file monitor */ if (zathura->file_monitor.monitor == NULL) { - char *filemonitor_backend = NULL; - girara_setting_get(zathura->ui.session, "filemonitor", - &filemonitor_backend); + char* filemonitor_backend = NULL; + girara_setting_get(zathura->ui.session, "filemonitor", &filemonitor_backend); zathura_filemonitor_type_t type = ZATHURA_FILEMONITOR_GLIB; if (g_strcmp0(filemonitor_backend, "noop") == 0) { type = ZATHURA_FILEMONITOR_NOOP; @@ -1141,7 +1174,7 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, } /* create marks list */ - zathura->global.marks = girara_list_new2((girara_free_function_t)mark_free); + zathura->global.marks = girara_list_new2((girara_free_function_t) mark_free); if (zathura->global.marks == NULL) { goto error_free; } @@ -1152,32 +1185,27 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, } /* get view port size */ - GtkAdjustment *hadjustment = gtk_scrolled_window_get_hadjustment( - GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); - GtkAdjustment *vadjustment = gtk_scrolled_window_get_vadjustment( - GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); + GtkAdjustment* hadjustment = gtk_scrolled_window_get_hadjustment( + GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); + GtkAdjustment* vadjustment = gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); - const unsigned int view_width = - floor(gtk_adjustment_get_page_size(hadjustment)); + const unsigned int view_width = floor(gtk_adjustment_get_page_size(hadjustment)); zathura_document_set_viewport_width(zathura->document, view_width); - const unsigned int view_height = - floor(gtk_adjustment_get_page_size(vadjustment)); + const unsigned int view_height = floor(gtk_adjustment_get_page_size(vadjustment)); zathura_document_set_viewport_height(zathura->document, view_height); zathura_update_view_ppi(zathura); - /* call screen-changed callback to connect monitors-changed signal on initial - * screen */ + /* call screen-changed callback to connect monitors-changed signal on initial screen */ cb_widget_screen_changed(zathura->ui.session->gtk.view, NULL, zathura); /* get initial device scale */ - const int device_factor = - gtk_widget_get_scale_factor(zathura->ui.session->gtk.view); - zathura_document_set_device_factors(zathura->document, device_factor, - device_factor); + const int device_factor = gtk_widget_get_scale_factor(zathura->ui.session->gtk.view); + zathura_document_set_device_factors(zathura->document, device_factor, device_factor); /* create blank pages */ - zathura->pages = calloc(number_of_pages, sizeof(GtkWidget *)); + zathura->pages = calloc(number_of_pages, sizeof(GtkWidget*)); if (zathura->pages == NULL) { goto error_free; } @@ -1187,7 +1215,7 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, &most_freq_height); for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) { - zathura_page_t *page = zathura_document_get_page(document, page_id); + zathura_page_t* page = zathura_document_get_page(document, page_id); if (page == NULL) { goto error_free; } @@ -1199,7 +1227,7 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, zathura_page_set_width(page, most_freq_width); zathura_page_set_height(page, most_freq_height); - GtkWidget *page_widget = zathura_page_widget_new(zathura, page); + GtkWidget* page_widget = zathura_page_widget_new(zathura, page); if (page_widget == NULL) { goto error_free; } @@ -1211,20 +1239,20 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, gtk_widget_set_valign(page_widget, GTK_ALIGN_CENTER); g_signal_connect(G_OBJECT(page_widget), "text-selected", - G_CALLBACK(cb_page_widget_text_selected), zathura); + G_CALLBACK(cb_page_widget_text_selected), zathura); g_signal_connect(G_OBJECT(page_widget), "image-selected", - G_CALLBACK(cb_page_widget_image_selected), zathura); + G_CALLBACK(cb_page_widget_image_selected), zathura); g_signal_connect(G_OBJECT(page_widget), "enter-link", - G_CALLBACK(cb_page_widget_link), (gpointer) true); + G_CALLBACK(cb_page_widget_link), (gpointer) true); g_signal_connect(G_OBJECT(page_widget), "leave-link", - G_CALLBACK(cb_page_widget_link), (gpointer) false); + G_CALLBACK(cb_page_widget_link), (gpointer) false); g_signal_connect(G_OBJECT(page_widget), "scaled-button-release", - G_CALLBACK(cb_page_widget_scaled_button_release), zathura); + G_CALLBACK(cb_page_widget_scaled_button_release), zathura); } /* view mode */ unsigned int pages_per_row = 1; - char *first_page_column_list = NULL; + char* first_page_column_list = NULL; unsigned int page_padding = 1; bool page_right_to_left = false; @@ -1237,32 +1265,25 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, } /* read first_page_column list */ - if (file_info.first_page_column_list != NULL && - *file_info.first_page_column_list != '\0') { + if (file_info.first_page_column_list != NULL && *file_info.first_page_column_list != '\0') { first_page_column_list = file_info.first_page_column_list; file_info.first_page_column_list = NULL; } else { - girara_setting_get(zathura->ui.session, "first-page-column", - &first_page_column_list); + girara_setting_get(zathura->ui.session, "first-page-column", &first_page_column_list); } /* find value for first_page_column */ - unsigned int first_page_column = - find_first_page_column(first_page_column_list, pages_per_row); + unsigned int first_page_column = find_first_page_column(first_page_column_list, pages_per_row); girara_setting_set(zathura->ui.session, "pages-per-row", &pages_per_row); - girara_setting_set(zathura->ui.session, "first-page-column", - first_page_column_list); + girara_setting_set(zathura->ui.session, "first-page-column", first_page_column_list); g_free(file_info.first_page_column_list); g_free(first_page_column_list); page_right_to_left = file_info.page_right_to_left; - page_widget_set_mode(zathura, page_padding, pages_per_row, first_page_column, - page_right_to_left); - - zathura_document_set_page_layout(zathura->document, page_padding, - pages_per_row, first_page_column); + page_widget_set_mode(zathura, page_padding, pages_per_row, first_page_column, page_right_to_left); + zathura_document_set_page_layout(zathura->document, page_padding, pages_per_row, first_page_column); girara_set_view(zathura->ui.session, zathura->ui.page_widget); @@ -1279,7 +1300,7 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, } /* update title */ - char *formatted_filename = get_formatted_filename(zathura, false); + char* formatted_filename = get_formatted_filename(zathura, false); girara_set_window_title(zathura->ui.session, formatted_filename); g_free(formatted_filename); @@ -1287,20 +1308,17 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, adjust_view(zathura); for (unsigned int page_id = 0; page_id < number_of_pages; page_id++) { /* set widget size */ - zathura_page_t *page = zathura_document_get_page(document, page_id); + zathura_page_t* page = zathura_document_get_page(document, page_id); unsigned int page_height = 0; - unsigned int page_width = 0; + unsigned int page_width = 0; /* adjust_view calls render_all in some cases and render_all calls * gtk_widget_set_size_request. To be sure that it's really called, do it * here once again. */ const double height = zathura_page_get_height(page); const double width = zathura_page_get_width(page); - - page_calc_height_width(zathura->document, height, width, &page_height, - &page_width, true); - gtk_widget_set_size_request(zathura->pages[page_id], page_width, - page_height); + page_calc_height_width(zathura->document, height, width, &page_height, &page_width, true); + gtk_widget_set_size_request(zathura->pages[page_id], page_width, page_height); /* show widget */ gtk_widget_show(zathura->pages[page_id]); @@ -1310,8 +1328,7 @@ bool document_open(zathura_t *zathura, const char *path, const char *uri, page_set(zathura, zathura_document_get_current_page_number(document)); /* Set position (only if restoring from history file) */ - if (file_info.current_page == - zathura_document_get_current_page_number(document) && + if (file_info.current_page == zathura_document_get_current_page_number(document) && (file_info.position_x != 0 || file_info.position_y != 0)) { position_set(zathura, file_info.position_x, file_info.position_y); } @@ -1329,9 +1346,10 @@ error_out: return false; } -bool document_open_synctex(zathura_t *zathura, const char *path, - const char *uri, const char *password, - const char *synctex) { +bool +document_open_synctex(zathura_t* zathura, const char* path, const char* uri, + const char* password, const char* synctex) +{ bool ret = document_open(zathura, path, password, uri, ZATHURA_PAGE_NUMBER_UNSPECIFIED); if (ret == false) { @@ -1343,7 +1361,7 @@ bool document_open_synctex(zathura_t *zathura, const char *path, int line = 0; int column = 0; - char *input_file = NULL; + char* input_file = NULL; if (synctex_parse_input(synctex, &input_file, &line, &column) == false) { return false; } @@ -1353,29 +1371,30 @@ bool document_open_synctex(zathura_t *zathura, const char *path, return ret; } -void document_open_idle(zathura_t *zathura, const char *path, - const char *password, int page_number, const char *mode, - const char *synctex, const char *search_string) { +void +document_open_idle(zathura_t* zathura, const char* path, const char* password, + int page_number, const char* mode, const char* synctex, + const char* search_string) +{ g_return_if_fail(zathura != NULL); g_return_if_fail(path != NULL); - zathura_document_info_t *document_info = - g_try_malloc0(sizeof(zathura_document_info_t)); + zathura_document_info_t* document_info = g_try_malloc0(sizeof(zathura_document_info_t)); if (document_info == NULL) { return; } - document_info->zathura = zathura; - document_info->path = g_strdup(path); + document_info->zathura = zathura; + document_info->path = g_strdup(path); if (password != NULL) { - document_info->password = g_strdup(password); + document_info->password = g_strdup(password); } document_info->page_number = page_number; if (mode != NULL) { - document_info->mode = g_strdup(mode); + document_info->mode = g_strdup(mode); } if (synctex != NULL) { - document_info->synctex = g_strdup(synctex); + document_info->synctex = g_strdup(synctex); } if (bookmark_name != NULL) { document_info->bookmark_name = g_strdup(bookmark_name); @@ -1387,17 +1406,18 @@ void document_open_idle(zathura_t *zathura, const char *path, gdk_threads_add_idle(document_info_open, document_info); } -bool document_save(zathura_t *zathura, const char *path, bool overwrite) { +bool +document_save(zathura_t* zathura, const char* path, bool overwrite) +{ g_return_val_if_fail(zathura, false); g_return_val_if_fail(zathura->document, false); g_return_val_if_fail(path, false); - gchar *file_path = girara_fix_path(path); + gchar* file_path = girara_fix_path(path); /* 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; + char* basename = g_path_get_basename(zathura_document_get_path(zathura->document)); + char* tmp = file_path; file_path = g_build_filename(file_path, basename, NULL); g_free(tmp); g_free(basename); @@ -1410,8 +1430,7 @@ bool document_save(zathura_t *zathura, const char *path, bool overwrite) { return false; } - zathura_error_t error = - zathura_document_save_as(zathura->document, file_path); + zathura_error_t error = zathura_document_save_as(zathura->document, file_path); g_free(file_path); if (error != ZATHURA_ERROR_OK) { @@ -1423,26 +1442,29 @@ bool document_save(zathura_t *zathura, const char *path, bool overwrite) { return true; } -static void remove_page_from_table(GtkWidget *page, - gpointer UNUSED(permanent)) { +static void +remove_page_from_table(GtkWidget* page, gpointer UNUSED(permanent)) +{ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(page)), page); } -static void save_fileinfo_to_db(zathura_t *zathura) { - const char *path = zathura_document_get_path(zathura->document); - const uint8_t *file_hash = zathura_document_get_hash(zathura->document); +static void +save_fileinfo_to_db(zathura_t* zathura) +{ + const char* path = zathura_document_get_path(zathura->document); + const uint8_t* file_hash = zathura_document_get_hash(zathura->document); zathura_fileinfo_t file_info = { - .current_page = - zathura_document_get_current_page_number(zathura->document), - .page_offset = zathura_document_get_page_offset(zathura->document), - .zoom = zathura_document_get_zoom(zathura->document), - .rotation = zathura_document_get_rotation(zathura->document), - .pages_per_row = 1, - .first_page_column_list = "1:2", - .page_right_to_left = false, - .position_x = zathura_document_get_position_x(zathura->document), - .position_y = zathura_document_get_position_y(zathura->document)}; + .current_page = zathura_document_get_current_page_number(zathura->document), + .page_offset = zathura_document_get_page_offset(zathura->document), + .zoom = zathura_document_get_zoom(zathura->document), + .rotation = zathura_document_get_rotation(zathura->document), + .pages_per_row = 1, + .first_page_column_list = "1:2", + .page_right_to_left = false, + .position_x = zathura_document_get_position_x(zathura->document), + .position_y = zathura_document_get_position_y(zathura->document) + }; girara_setting_get(zathura->ui.session, "pages-per-row", &(file_info.pages_per_row)); @@ -1459,15 +1481,16 @@ static void save_fileinfo_to_db(zathura_t *zathura) { g_free(file_info.first_page_column_list); } -bool document_close(zathura_t *zathura, bool keep_monitor) { +bool +document_close(zathura_t* zathura, bool keep_monitor) +{ if (zathura == NULL || zathura->document == NULL) { return false; } /* reset window icon */ - if (zathura->ui.session != NULL && - zathura->window_icon_render_request != NULL) { - char *window_icon = NULL; + if (zathura->ui.session != NULL && zathura->window_icon_render_request != NULL) { + char* window_icon = NULL; girara_setting_get(zathura->ui.session, "window-icon", &window_icon); girara_setting_set(zathura->ui.session, "window-icon", window_icon); g_free(window_icon); @@ -1509,10 +1532,8 @@ bool document_close(zathura_t *zathura, bool keep_monitor) { g_clear_object(&zathura->sync.render_thread); /* remove widgets */ - gtk_container_foreach(GTK_CONTAINER(zathura->ui.page_widget), - remove_page_from_table, NULL); - for (unsigned int i = 0; - i < zathura_document_get_number_of_pages(zathura->document); i++) { + gtk_container_foreach(GTK_CONTAINER(zathura->ui.page_widget), remove_page_from_table, NULL); + for (unsigned int i = 0; i < zathura_document_get_number_of_pages(zathura->document); i++) { g_object_unref(zathura->pages[i]); } free(zathura->pages); @@ -1533,8 +1554,7 @@ bool document_close(zathura_t *zathura, bool keep_monitor) { statusbar_page_number_update(zathura); if (zathura->ui.session != NULL && zathura->ui.statusbar.file != NULL) { - girara_statusbar_item_set_text(zathura->ui.session, - zathura->ui.statusbar.file, _("[No name]")); + girara_statusbar_item_set_text(zathura->ui.session, zathura->ui.statusbar.file, _("[No name]")); } /* update title */ @@ -1543,12 +1563,14 @@ bool document_close(zathura_t *zathura, bool keep_monitor) { return true; } -bool page_set(zathura_t *zathura, unsigned int page_id) { +bool +page_set(zathura_t* zathura, unsigned int page_id) +{ if (zathura == NULL || zathura->document == NULL) { goto error_out; } - zathura_page_t *page = zathura_document_get_page(zathura->document, page_id); + zathura_page_t* page = zathura_document_get_page(zathura->document, page_id); if (page == NULL) { goto error_out; } @@ -1556,8 +1578,7 @@ bool page_set(zathura_t *zathura, unsigned int page_id) { zathura_document_set_current_page_number(zathura->document, page_id); bool continuous_hist_save = false; - girara_setting_get(zathura->ui.session, "continuous-hist-save", - &continuous_hist_save); + girara_setting_get(zathura->ui.session, "continuous-hist-save", &continuous_hist_save); if (continuous_hist_save) { save_fileinfo_to_db(zathura); } @@ -1569,41 +1590,35 @@ error_out: return false; } -void statusbar_page_number_update(zathura_t *zathura) { +void +statusbar_page_number_update(zathura_t* zathura) +{ if (zathura == NULL || zathura->ui.statusbar.page_number == NULL) { return; } - 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 number_of_pages = zathura_document_get_number_of_pages(zathura->document); + unsigned int current_page_number = zathura_document_get_current_page_number(zathura->document); if (zathura->document != NULL) { - zathura_page_t *page = - zathura_document_get_page(zathura->document, current_page_number); - char *page_label = zathura_page_get_label(page, NULL); + zathura_page_t* page = zathura_document_get_page(zathura->document, current_page_number); + char* page_label = zathura_page_get_label(page, NULL); - char *page_number_text = NULL; + char* page_number_text = NULL; if (page_label != NULL) { - page_number_text = g_strdup_printf( - "[%s (%d/%d)]", page_label, current_page_number + 1, number_of_pages); + page_number_text = g_strdup_printf("[%s (%d/%d)]", page_label, current_page_number + 1, number_of_pages); g_free(page_label); } else { - page_number_text = - g_strdup_printf("[%d/%d]", current_page_number + 1, number_of_pages); + page_number_text = g_strdup_printf("[%d/%d]", current_page_number + 1, number_of_pages); } - girara_statusbar_item_set_text(zathura->ui.session, - zathura->ui.statusbar.page_number, - page_number_text); + girara_statusbar_item_set_text(zathura->ui.session, zathura->ui.statusbar.page_number, page_number_text); bool page_number_in_window_title = false; - girara_setting_get(zathura->ui.session, "window-title-page", - &page_number_in_window_title); + girara_setting_get(zathura->ui.session, "window-title-page", &page_number_in_window_title); if (page_number_in_window_title == true) { - char *filename = get_formatted_filename(zathura, false); - char *title = g_strdup_printf("%s %s", filename, page_number_text); + char* filename = get_formatted_filename(zathura, false); + char* title = g_strdup_printf("%s %s", filename, page_number_text); girara_set_window_title(zathura->ui.session, title); g_free(title); g_free(filename); @@ -1611,15 +1626,15 @@ void statusbar_page_number_update(zathura_t *zathura) { g_free(page_number_text); } else { - girara_statusbar_item_set_text(zathura->ui.session, - zathura->ui.statusbar.page_number, ""); + girara_statusbar_item_set_text(zathura->ui.session, zathura->ui.statusbar.page_number, ""); } } -void page_widget_set_mode(zathura_t *zathura, unsigned int page_padding, - unsigned int pages_per_row, - unsigned int first_page_column, - bool page_right_to_left) { +void +page_widget_set_mode(zathura_t* zathura, unsigned int page_padding, + unsigned int pages_per_row, unsigned int first_page_column, + bool page_right_to_left) +{ /* show at least one page */ if (pages_per_row == 0) { pages_per_row = 1; @@ -1637,11 +1652,9 @@ void page_widget_set_mode(zathura_t *zathura, unsigned int page_padding, return; } - gtk_container_foreach(GTK_CONTAINER(zathura->ui.page_widget), - remove_page_from_table, NULL); + gtk_container_foreach(GTK_CONTAINER(zathura->ui.page_widget), remove_page_from_table, NULL); - 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); gtk_grid_set_row_spacing(GTK_GRID(zathura->ui.page_widget), page_padding); gtk_grid_set_column_spacing(GTK_GRID(zathura->ui.page_widget), page_padding); @@ -1650,7 +1663,7 @@ void page_widget_set_mode(zathura_t *zathura, unsigned int page_padding, int x = (i + first_page_column - 1) % pages_per_row; int y = (i + first_page_column - 1) / pages_per_row; - GtkWidget *page_widget = zathura->pages[i]; + GtkWidget* page_widget = zathura->pages[i]; if (page_right_to_left) { x = pages_per_row - 1 - x; } @@ -1661,14 +1674,15 @@ void page_widget_set_mode(zathura_t *zathura, unsigned int page_padding, gtk_widget_show_all(zathura->ui.page_widget); } -bool position_set(zathura_t *zathura, double position_x, double position_y) { +bool +position_set(zathura_t* zathura, double position_x, double position_y) +{ if (zathura == NULL || zathura->document == NULL) { return false; } double comppos_x, comppos_y; - const unsigned int page_id = - zathura_document_get_current_page_number(zathura->document); + const unsigned int page_id = zathura_document_get_current_page_number(zathura->document); bool vertical_center = false; girara_setting_get(zathura->ui.session, "vertical-center", &vertical_center); @@ -1676,17 +1690,14 @@ bool position_set(zathura_t *zathura, double position_x, double position_y) { /* xalign = 0.5: center horizontally (with the page, not the document) */ if (vertical_center == true) { /* yalign = 0.5: center vertically */ - page_number_to_position(zathura->document, page_id, 0.5, 0.5, &comppos_x, - &comppos_y); + page_number_to_position(zathura->document, page_id, 0.5, 0.5, &comppos_x, &comppos_y); } else { /* yalign = 0.0: align page an viewport edges at the top */ - page_number_to_position(zathura->document, page_id, 0.5, 0.0, &comppos_x, - &comppos_y); + page_number_to_position(zathura->document, page_id, 0.5, 0.0, &comppos_x, &comppos_y); } /* automatic horizontal adjustment */ - zathura_adjust_mode_t adjust_mode = - zathura_document_get_adjust_mode(zathura->document); + zathura_adjust_mode_t adjust_mode = zathura_document_get_adjust_mode(zathura->document); /* negative position_x mean: use the computed value */ if (position_x < 0) { @@ -1696,8 +1707,9 @@ bool position_set(zathura_t *zathura, double position_x, double position_y) { /* center horizontally */ if (adjust_mode == ZATHURA_ADJUST_BESTFIT || - adjust_mode == ZATHURA_ADJUST_WIDTH || zoom_center == true) { - position_x = 0.5; + adjust_mode == ZATHURA_ADJUST_WIDTH || + zoom_center == true) { + position_x = 0.5; } } @@ -1715,23 +1727,26 @@ bool position_set(zathura_t *zathura, double position_x, double position_y) { return true; } -void refresh_view(zathura_t *zathura) { +void +refresh_view(zathura_t* zathura) +{ g_return_if_fail(zathura != NULL); /* emit a custom refresh-view signal */ - g_signal_emit(zathura->ui.session->gtk.view, zathura->signals.refresh_view, 0, - zathura); + g_signal_emit(zathura->ui.session->gtk.view, zathura->signals.refresh_view, + 0, zathura); } -bool adjust_view(zathura_t *zathura) { +bool +adjust_view(zathura_t* zathura) +{ g_return_val_if_fail(zathura != NULL, false); if (zathura->ui.page_widget == NULL || zathura->document == NULL) { goto error_ret; } - zathura_adjust_mode_t adjust_mode = - zathura_document_get_adjust_mode(zathura->document); + zathura_adjust_mode_t adjust_mode = zathura_document_get_adjust_mode(zathura->document); if (adjust_mode == ZATHURA_ADJUST_NONE) { /* there is nothing todo */ goto error_ret; @@ -1742,13 +1757,10 @@ bool adjust_view(zathura_t *zathura) { unsigned int view_height = 0, view_width = 0; zathura_document_get_cell_size(zathura->document, &cell_height, &cell_width); - zathura_document_get_document_size(zathura->document, &document_height, - &document_width); - zathura_document_get_viewport_size(zathura->document, &view_height, - &view_width); + zathura_document_get_document_size(zathura->document, &document_height, &document_width); + zathura_document_get_viewport_size(zathura->document, &view_height, &view_width); - if (view_height == 0 || view_width == 0 || cell_height == 0 || - cell_width == 0 || document_width == 0) { + if (view_height == 0 || view_width == 0 || cell_height == 0 || cell_width == 0 || document_width == 0) { goto error_ret; } @@ -1772,12 +1784,11 @@ bool adjust_view(zathura_t *zathura) { /* save new zoom and recompute cell size */ zathura_document_set_zoom(zathura->document, newzoom); unsigned int new_cell_height = 0, new_cell_width = 0; - zathura_document_get_cell_size(zathura->document, &new_cell_height, - &new_cell_width); + zathura_document_get_cell_size(zathura->document, &new_cell_height, &new_cell_width); /* - * XXX requiring a larger difference apparently circumvents #94 for some - * users; this is not a proper fix + * XXX requiring a larger difference apparently circumvents #94 for some users; this is not a + * proper fix */ static const int min_change = 2; /* if the change in zoom changes page cell dimensions, render */ @@ -1795,9 +1806,11 @@ error_ret: } #ifdef G_OS_UNIX -static gboolean zathura_signal_sigterm(gpointer data) { +static gboolean +zathura_signal_sigterm(gpointer data) +{ if (data != NULL) { - zathura_t *zathura = data; + zathura_t* zathura = data; cb_destroy(NULL, zathura); } From 52e8dae65bb53fb4a6455d9bf8fd4562075e4d5d Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Wed, 1 Dec 2021 20:16:46 +0100 Subject: [PATCH 07/12] Fixed the whitespace difference from upstream in document.c. Praise VIM. --- zathura/document.c | 396 +++++++++++++++++++++++++-------------------- 1 file changed, 222 insertions(+), 174 deletions(-) diff --git a/zathura/document.c b/zathura/document.c index 3e0e6e4..818e2b6 100644 --- a/zathura/document.c +++ b/zathura/document.c @@ -1,78 +1,78 @@ /* SPDX-License-Identifier: Zlib */ -#include -#include -#include -#include #include #include +#include +#include +#include +#include #include #include #include "adjustment.h" -#include "content-type.h" #include "document.h" -#include "page.h" -#include "plugin.h" #include "utils.h" #include "zathura.h" +#include "page.h" +#include "plugin.h" +#include "content-type.h" /** * Document */ struct zathura_document_s { - char *file_path; /**< File path of the document */ - char *uri; /**< URI of the document */ - char *basename; /**< Basename of the document */ - uint8_t hash_sha256[32]; /**< SHA256 hash of the document */ - const char *password; /**< Password of the document */ - unsigned int current_page_number; /**< Current page number */ - unsigned int number_of_pages; /**< Number of pages */ - double zoom; /**< Zoom value */ - unsigned int rotate; /**< Rotation */ - void *data; /**< Custom data */ + char* file_path; /**< File path of the document */ + char* uri; /**< URI of the document */ + char* basename; /**< Basename of the document */ + uint8_t hash_sha256[32]; /**< SHA256 hash of the document */ + const char* password; /**< Password of the document */ + unsigned int current_page_number; /**< Current page number */ + unsigned int number_of_pages; /**< Number of pages */ + double zoom; /**< Zoom value */ + unsigned int rotate; /**< Rotation */ + void* data; /**< Custom data */ zathura_adjust_mode_t adjust_mode; /**< Adjust mode (best-fit, width) */ - int page_offset; /**< Page offset */ - double cell_width; /**< width of a page cell in the document (not transformed - by scale and rotation) */ - double cell_height; /**< height of a page cell in the document (not - transformed by scale and rotation) */ - unsigned int view_width; /**< width of current viewport */ + int page_offset; /**< Page offset */ + double cell_width; /**< width of a page cell in the document (not transformed by scale and rotation) */ + double cell_height; /**< height of a page cell in the document (not transformed by scale and rotation) */ + unsigned int view_width; /**< width of current viewport */ unsigned int view_height; /**< height of current viewport */ - double view_ppi; /**< PPI of the current viewport */ - zathura_device_factors_t - device_factors; /**< x and y device scale factors (for e.g. HiDPI) */ - unsigned int pages_per_row; /**< number of pages in a row */ + double view_ppi; /**< PPI of the current viewport */ + zathura_device_factors_t device_factors; /**< x and y device scale factors (for e.g. HiDPI) */ + unsigned int pages_per_row; /**< number of pages in a row */ unsigned int first_page_column; /**< column of the first page */ - unsigned int page_padding; /**< padding between pages */ - double position_x; /**< X adjustment */ - double position_y; /**< Y adjustment */ + unsigned int page_padding; /**< padding between pages */ + double position_x; /**< X adjustment */ + double position_y; /**< Y adjustment */ /** * Document pages */ - zathura_page_t **pages; + zathura_page_t** pages; /** * Used plugin */ - zathura_plugin_t *plugin; + zathura_plugin_t* plugin; }; -static void check_set_error(zathura_error_t *error, zathura_error_t code) { +static void +check_set_error(zathura_error_t* error, zathura_error_t code) { if (error != NULL) { *error = code; } } -static bool hash_file_sha256(uint8_t *dst, const char *path) { - FILE *f = fopen(path, "rb"); +static bool +hash_file_sha256(uint8_t* dst, const char* path) +{ + FILE* f = fopen(path, "rb"); if (f == NULL) { return false; } - GChecksum *checksum = g_checksum_new(G_CHECKSUM_SHA256); + GChecksum* checksum = g_checksum_new(G_CHECKSUM_SHA256); if (checksum == NULL) { fclose(f); return false; @@ -97,18 +97,19 @@ static bool hash_file_sha256(uint8_t *dst, const char *path) { return true; } -zathura_document_t *zathura_document_open(zathura_t *zathura, const char *path, - const char *uri, const char *password, - zathura_error_t *error) { +zathura_document_t* +zathura_document_open(zathura_t* zathura, const char* path, const char* uri, + const char* password, zathura_error_t* error) +{ if (zathura == NULL || path == NULL) { return NULL; } - GFile *file = g_file_new_for_path(path); - char *real_path = NULL; - char *content_type = NULL; - zathura_plugin_t *plugin = NULL; - zathura_document_t *document = NULL; + GFile* file = g_file_new_for_path(path); + char* real_path = NULL; + char* content_type = NULL; + zathura_plugin_t* plugin = NULL; + zathura_document_t* document = NULL; if (file == NULL) { girara_error("Error while handling path '%s'.", path); @@ -123,22 +124,19 @@ zathura_document_t *zathura_document_open(zathura_t *zathura, const char *path, goto error_free; } - content_type = zathura_content_type_guess( - zathura->content_type_context, real_path, - zathura_plugin_manager_get_content_types(zathura->plugins.manager)); + content_type = zathura_content_type_guess(zathura->content_type_context, real_path, zathura_plugin_manager_get_content_types(zathura->plugins.manager)); if (content_type == NULL) { girara_error("Could not determine file type."); check_set_error(error, ZATHURA_ERROR_UNKNOWN); goto error_free; } - plugin = - zathura_plugin_manager_get_plugin(zathura->plugins.manager, content_type); + plugin = zathura_plugin_manager_get_plugin(zathura->plugins.manager, content_type); if (plugin == NULL) { girara_error("Unknown file type: '%s'", content_type); check_set_error(error, ZATHURA_ERROR_UNKNOWN); - g_free((void *)content_type); + g_free((void*)content_type); content_type = NULL; goto error_free; @@ -153,37 +151,36 @@ zathura_document_t *zathura_document_open(zathura_t *zathura, const char *path, goto error_free; } - document->file_path = real_path; - document->uri = g_strdup(uri); + document->file_path = real_path; + document->uri = g_strdup(uri); if (document->uri == NULL) { - document->basename = g_file_get_basename(file); + document->basename = g_file_get_basename(file); } else { - GFile *gf = g_file_new_for_uri(document->uri); + GFile*gf = g_file_new_for_uri(document->uri); document->basename = g_file_get_basename(gf); g_object_unref(gf); } hash_file_sha256(document->hash_sha256, document->file_path); - document->password = password; - document->zoom = 1.0; - document->plugin = plugin; + document->password = password; + document->zoom = 1.0; + document->plugin = plugin; document->adjust_mode = ZATHURA_ADJUST_NONE; - document->cell_width = 0.0; + document->cell_width = 0.0; document->cell_height = 0.0; document->view_height = 0; - document->view_width = 0; - document->view_ppi = 0.0; + document->view_width = 0; + document->view_ppi = 0.0; document->device_factors.x = 1.0; document->device_factors.y = 1.0; - document->position_x = 0.0; - document->position_y = 0.0; + document->position_x = 0.0; + document->position_y = 0.0; real_path = NULL; g_object_unref(file); file = NULL; /* open document */ - const zathura_plugin_functions_t *functions = - zathura_plugin_get_functions(plugin); + const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(plugin); if (functions->document_open == NULL) { girara_error("plugin has no open function\n"); goto error_free; @@ -197,15 +194,14 @@ zathura_document_t *zathura_document_open(zathura_t *zathura, const char *path, } /* read all pages */ - document->pages = calloc(document->number_of_pages, sizeof(zathura_page_t *)); + document->pages = calloc(document->number_of_pages, sizeof(zathura_page_t*)); if (document->pages == NULL) { check_set_error(error, ZATHURA_ERROR_OUT_OF_MEMORY); goto error_free; } - for (unsigned int page_id = 0; page_id < document->number_of_pages; - page_id++) { - zathura_page_t *page = zathura_page_new(document, page_id, NULL); + for (unsigned int page_id = 0; page_id < document->number_of_pages; page_id++) { + zathura_page_t* page = zathura_page_new(document, page_id, NULL); if (page == NULL) { check_set_error(error, ZATHURA_ERROR_OUT_OF_MEMORY); goto error_free; @@ -213,8 +209,7 @@ zathura_document_t *zathura_document_open(zathura_t *zathura, const char *path, document->pages[page_id] = page; - /* cell_width and cell_height is the maximum of all the pages width and - * height */ + /* cell_width and cell_height is the maximum of all the pages width and height */ const double width = zathura_page_get_width(page); if (document->cell_width < width) document->cell_width = width; @@ -244,15 +239,16 @@ error_free: return NULL; } -zathura_error_t zathura_document_free(zathura_document_t *document) { +zathura_error_t +zathura_document_free(zathura_document_t* document) +{ if (document == NULL || document->plugin == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; } if (document->pages != NULL) { /* free pages */ - for (unsigned int page_id = 0; page_id < document->number_of_pages; - page_id++) { + for (unsigned int page_id = 0; page_id < document->number_of_pages; page_id++) { zathura_page_free(document->pages[page_id]); document->pages[page_id] = NULL; } @@ -261,8 +257,7 @@ zathura_error_t zathura_document_free(zathura_document_t *document) { /* free document */ zathura_error_t error = ZATHURA_ERROR_OK; - const zathura_plugin_functions_t *functions = - zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); if (functions->document_free == NULL) { error = ZATHURA_ERROR_NOT_IMPLEMENTED; } else { @@ -278,7 +273,9 @@ zathura_error_t zathura_document_free(zathura_document_t *document) { return error; } -const char *zathura_document_get_path(zathura_document_t *document) { +const char* +zathura_document_get_path(zathura_document_t* document) +{ if (document == NULL) { return NULL; } @@ -286,7 +283,9 @@ const char *zathura_document_get_path(zathura_document_t *document) { return document->file_path; } -const uint8_t *zathura_document_get_hash(zathura_document_t *document) { +const uint8_t* +zathura_document_get_hash(zathura_document_t* document) +{ if (document == NULL) { return NULL; } @@ -294,7 +293,9 @@ const uint8_t *zathura_document_get_hash(zathura_document_t *document) { return document->hash_sha256; } -const char *zathura_document_get_uri(zathura_document_t *document) { +const char* +zathura_document_get_uri(zathura_document_t* document) +{ if (document == NULL) { return NULL; } @@ -302,7 +303,9 @@ const char *zathura_document_get_uri(zathura_document_t *document) { return document->uri; } -const char *zathura_document_get_basename(zathura_document_t *document) { +const char* +zathura_document_get_basename(zathura_document_t* document) +{ if (document == NULL) { return NULL; } @@ -310,7 +313,9 @@ const char *zathura_document_get_basename(zathura_document_t *document) { return document->basename; } -const char *zathura_document_get_password(zathura_document_t *document) { +const char* +zathura_document_get_password(zathura_document_t* document) +{ if (document == NULL) { return NULL; } @@ -318,17 +323,19 @@ const char *zathura_document_get_password(zathura_document_t *document) { return document->password; } -zathura_page_t *zathura_document_get_page(zathura_document_t *document, - unsigned int index) { - if (document == NULL || document->pages == NULL || - (document->number_of_pages <= index)) { +zathura_page_t* +zathura_document_get_page(zathura_document_t* document, unsigned int index) +{ + if (document == NULL || document->pages == NULL || (document->number_of_pages <= index)) { return NULL; } return document->pages[index]; } -void *zathura_document_get_data(zathura_document_t *document) { +void* +zathura_document_get_data(zathura_document_t* document) +{ if (document == NULL) { return NULL; } @@ -336,7 +343,9 @@ void *zathura_document_get_data(zathura_document_t *document) { return document->data; } -void zathura_document_set_data(zathura_document_t *document, void *data) { +void +zathura_document_set_data(zathura_document_t* document, void* data) +{ if (document == NULL) { return; } @@ -345,7 +354,8 @@ void zathura_document_set_data(zathura_document_t *document, void *data) { } unsigned int -zathura_document_get_number_of_pages(zathura_document_t *document) { +zathura_document_get_number_of_pages(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -353,8 +363,9 @@ zathura_document_get_number_of_pages(zathura_document_t *document) { return document->number_of_pages; } -void zathura_document_set_number_of_pages(zathura_document_t *document, - unsigned int number_of_pages) { +void +zathura_document_set_number_of_pages(zathura_document_t* document, unsigned int number_of_pages) +{ if (document == NULL) { return; } @@ -363,7 +374,8 @@ void zathura_document_set_number_of_pages(zathura_document_t *document, } unsigned int -zathura_document_get_current_page_number(zathura_document_t *document) { +zathura_document_get_current_page_number(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -371,8 +383,10 @@ zathura_document_get_current_page_number(zathura_document_t *document) { return document->current_page_number; } -void zathura_document_set_current_page_number(zathura_document_t *document, - unsigned int current_page) { +void +zathura_document_set_current_page_number(zathura_document_t* document, unsigned int + current_page) +{ if (document == NULL) { return; } @@ -380,7 +394,9 @@ void zathura_document_set_current_page_number(zathura_document_t *document, document->current_page_number = current_page; } -double zathura_document_get_position_x(zathura_document_t *document) { +double +zathura_document_get_position_x(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -388,7 +404,9 @@ double zathura_document_get_position_x(zathura_document_t *document) { return document->position_x; } -double zathura_document_get_position_y(zathura_document_t *document) { +double +zathura_document_get_position_y(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -396,8 +414,9 @@ double zathura_document_get_position_y(zathura_document_t *document) { return document->position_y; } -void zathura_document_set_position_x(zathura_document_t *document, - double position_x) { +void +zathura_document_set_position_x(zathura_document_t* document, double position_x) +{ if (document == NULL) { return; } @@ -405,8 +424,9 @@ void zathura_document_set_position_x(zathura_document_t *document, document->position_x = position_x; } -void zathura_document_set_position_y(zathura_document_t *document, - double position_y) { +void +zathura_document_set_position_y(zathura_document_t* document, double position_y) +{ if (document == NULL) { return; } @@ -414,7 +434,9 @@ void zathura_document_set_position_y(zathura_document_t *document, document->position_y = position_y; } -double zathura_document_get_zoom(zathura_document_t *document) { +double +zathura_document_get_zoom(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -422,7 +444,9 @@ double zathura_document_get_zoom(zathura_document_t *document) { return document->zoom; } -void zathura_document_set_zoom(zathura_document_t *document, double zoom) { +void +zathura_document_set_zoom(zathura_document_t* document, double zoom) +{ if (document == NULL) { return; } @@ -431,7 +455,9 @@ void zathura_document_set_zoom(zathura_document_t *document, double zoom) { document->zoom = zoom; } -double zathura_document_get_scale(zathura_document_t *document) { +double +zathura_document_get_scale(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -446,7 +472,9 @@ double zathura_document_get_scale(zathura_document_t *document) { return document->zoom * ppi / 72.0; } -unsigned int zathura_document_get_rotation(zathura_document_t *document) { +unsigned int +zathura_document_get_rotation(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -454,8 +482,9 @@ unsigned int zathura_document_get_rotation(zathura_document_t *document) { return document->rotate; } -void zathura_document_set_rotation(zathura_document_t *document, - unsigned int rotation) { +void +zathura_document_set_rotation(zathura_document_t* document, unsigned int rotation) +{ if (document == NULL) { return; } @@ -473,7 +502,8 @@ void zathura_document_set_rotation(zathura_document_t *document, } zathura_adjust_mode_t -zathura_document_get_adjust_mode(zathura_document_t *document) { +zathura_document_get_adjust_mode(zathura_document_t* document) +{ if (document == NULL) { return ZATHURA_ADJUST_NONE; } @@ -481,8 +511,9 @@ zathura_document_get_adjust_mode(zathura_document_t *document) { return document->adjust_mode; } -void zathura_document_set_adjust_mode(zathura_document_t *document, - zathura_adjust_mode_t mode) { +void +zathura_document_set_adjust_mode(zathura_document_t* document, zathura_adjust_mode_t mode) +{ if (document == NULL) { return; } @@ -490,7 +521,9 @@ void zathura_document_set_adjust_mode(zathura_document_t *document, document->adjust_mode = mode; } -int zathura_document_get_page_offset(zathura_document_t *document) { +int +zathura_document_get_page_offset(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -498,8 +531,9 @@ int zathura_document_get_page_offset(zathura_document_t *document) { return document->page_offset; } -void zathura_document_set_page_offset(zathura_document_t *document, - unsigned int page_offset) { +void +zathura_document_set_page_offset(zathura_document_t* document, unsigned int page_offset) +{ if (document == NULL) { return; } @@ -507,53 +541,61 @@ void zathura_document_set_page_offset(zathura_document_t *document, document->page_offset = page_offset; } -void zathura_document_set_viewport_width(zathura_document_t *document, - unsigned int width) { +void +zathura_document_set_viewport_width(zathura_document_t* document, unsigned int width) +{ if (document == NULL) { return; } document->view_width = width; } -void zathura_document_set_viewport_height(zathura_document_t *document, - unsigned int height) { +void +zathura_document_set_viewport_height(zathura_document_t* document, unsigned int height) +{ if (document == NULL) { return; } document->view_height = height; } -void zathura_document_set_viewport_ppi(zathura_document_t *document, - double ppi) { +void +zathura_document_set_viewport_ppi(zathura_document_t* document, double ppi) +{ if (document == NULL) { return; } document->view_ppi = ppi; } -void zathura_document_get_viewport_size(zathura_document_t *document, - unsigned int *height, - unsigned int *width) { +void +zathura_document_get_viewport_size(zathura_document_t* document, + unsigned int *height, unsigned int* width) +{ g_return_if_fail(document != NULL && height != NULL && width != NULL); *height = document->view_height; *width = document->view_width; } -double zathura_document_get_viewport_ppi(zathura_document_t *document) { +double +zathura_document_get_viewport_ppi(zathura_document_t* document) +{ if (document == NULL) { return 0.0; } return document->view_ppi; } -void zathura_document_set_device_factors(zathura_document_t *document, - double x_factor, double y_factor) { +void +zathura_document_set_device_factors(zathura_document_t* document, + double x_factor, double y_factor) +{ if (document == NULL) { return; } if (fabs(x_factor) < DBL_EPSILON || fabs(y_factor) < DBL_EPSILON) { girara_debug("Ignoring new device factors %0.2f and %0.2f: too small", - x_factor, y_factor); + x_factor, y_factor); return; } @@ -562,7 +604,8 @@ void zathura_document_set_device_factors(zathura_document_t *document, } zathura_device_factors_t -zathura_document_get_device_factors(zathura_document_t *document) { +zathura_document_get_device_factors(zathura_document_t* document) +{ if (document == NULL) { /* The function is guaranteed to not return zero values */ return (zathura_device_factors_t){1.0, 1.0}; @@ -571,17 +614,20 @@ zathura_document_get_device_factors(zathura_document_t *document) { return document->device_factors; } -void zathura_document_get_cell_size(zathura_document_t *document, - unsigned int *height, unsigned int *width) { +void +zathura_document_get_cell_size(zathura_document_t* document, + unsigned int* height, unsigned int* width) +{ g_return_if_fail(document != NULL && height != NULL && width != NULL); page_calc_height_width(document, document->cell_height, document->cell_width, height, width, true); } -void zathura_document_get_document_size(zathura_document_t *document, - unsigned int *height, - unsigned int *width) { +void +zathura_document_get_document_size(zathura_document_t* document, + unsigned int* height, unsigned int* width) +{ g_return_if_fail(document != NULL && height != NULL && width != NULL); const unsigned int npag = zathura_document_get_number_of_pages(document); @@ -591,31 +637,32 @@ void zathura_document_get_document_size(zathura_document_t *document, return; } - const unsigned int c0 = zathura_document_get_first_page_column(document); - const unsigned int nrow = - (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */ - const unsigned int pad = zathura_document_get_page_padding(document); + const unsigned int c0 = zathura_document_get_first_page_column(document); + const unsigned int nrow = (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */ + const unsigned int pad = zathura_document_get_page_padding(document); unsigned int cell_height = 0; - unsigned int cell_width = 0; + unsigned int cell_width = 0; zathura_document_get_cell_size(document, &cell_height, &cell_width); - *width = ncol * cell_width + (ncol - 1) * pad; + *width = ncol * cell_width + (ncol - 1) * pad; *height = nrow * cell_height + (nrow - 1) * pad; } -void zathura_document_set_cell_size(zathura_document_t *document, +void +zathura_document_set_cell_size(zathura_document_t* document, unsigned int cell_height, - unsigned int cell_width) { + unsigned int cell_width) +{ document->cell_width = cell_width; document->cell_height = cell_height; } -void zathura_document_set_page_layout(zathura_document_t *document, - unsigned int page_padding, - unsigned int pages_per_row, - unsigned int first_page_column) { +void +zathura_document_set_page_layout(zathura_document_t* document, unsigned int page_padding, + unsigned int pages_per_row, unsigned int first_page_column) +{ g_return_if_fail(document != NULL); document->page_padding = page_padding; @@ -630,14 +677,18 @@ void zathura_document_set_page_layout(zathura_document_t *document, document->first_page_column = first_page_column; } -unsigned int zathura_document_get_page_padding(zathura_document_t *document) { +unsigned int +zathura_document_get_page_padding(zathura_document_t* document) +{ if (document == NULL) { return 0; } return document->page_padding; } -unsigned int zathura_document_get_pages_per_row(zathura_document_t *document) { +unsigned int +zathura_document_get_pages_per_row(zathura_document_t* document) +{ if (document == NULL) { return 0; } @@ -645,21 +696,22 @@ unsigned int zathura_document_get_pages_per_row(zathura_document_t *document) { } unsigned int -zathura_document_get_first_page_column(zathura_document_t *document) { +zathura_document_get_first_page_column(zathura_document_t* document) +{ if (document == NULL) { return 0; } return document->first_page_column; } -zathura_error_t zathura_document_save_as(zathura_document_t *document, - const char *path) { +zathura_error_t +zathura_document_save_as(zathura_document_t* document, const char* path) +{ if (document == NULL || document->plugin == NULL || path == NULL) { return ZATHURA_ERROR_UNKNOWN; } - const zathura_plugin_functions_t *functions = - zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); if (functions->document_save_as == NULL) { return ZATHURA_ERROR_NOT_IMPLEMENTED; } @@ -667,16 +719,15 @@ zathura_error_t zathura_document_save_as(zathura_document_t *document, return functions->document_save_as(document, document->data, path); } -girara_tree_node_t * -zathura_document_index_generate(zathura_document_t *document, - zathura_error_t *error) { +girara_tree_node_t* +zathura_document_index_generate(zathura_document_t* document, zathura_error_t* error) +{ if (document == NULL || document->plugin == NULL) { check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS); return NULL; } - const zathura_plugin_functions_t *functions = - zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); if (functions->document_index_generate == NULL) { check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED); return NULL; @@ -685,15 +736,15 @@ zathura_document_index_generate(zathura_document_t *document, return functions->document_index_generate(document, document->data, error); } -girara_list_t *zathura_document_attachments_get(zathura_document_t *document, - zathura_error_t *error) { +girara_list_t* +zathura_document_attachments_get(zathura_document_t* document, zathura_error_t* error) +{ if (document == NULL || document->plugin == NULL) { check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS); return NULL; } - const zathura_plugin_functions_t *functions = - zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); if (functions->document_attachments_get == NULL) { check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED); return NULL; @@ -702,49 +753,46 @@ girara_list_t *zathura_document_attachments_get(zathura_document_t *document, return functions->document_attachments_get(document, document->data, error); } -zathura_error_t zathura_document_attachment_save(zathura_document_t *document, - const char *attachment, - const char *file) { +zathura_error_t +zathura_document_attachment_save(zathura_document_t* document, const char* attachment, const char* file) +{ if (document == NULL || document->plugin == NULL) { return ZATHURA_ERROR_INVALID_ARGUMENTS; } - const zathura_plugin_functions_t *functions = - zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); if (functions->document_attachment_save == NULL) { return ZATHURA_ERROR_NOT_IMPLEMENTED; } - return functions->document_attachment_save(document, document->data, - attachment, file); + return functions->document_attachment_save(document, document->data, attachment, file); } -girara_list_t *zathura_document_get_information(zathura_document_t *document, - zathura_error_t *error) { +girara_list_t* +zathura_document_get_information(zathura_document_t* document, zathura_error_t* error) +{ if (document == NULL || document->plugin == NULL) { check_set_error(error, ZATHURA_ERROR_INVALID_ARGUMENTS); return NULL; } - const zathura_plugin_functions_t *functions = - zathura_plugin_get_functions(document->plugin); + const zathura_plugin_functions_t* functions = zathura_plugin_get_functions(document->plugin); if (functions->document_get_information == NULL) { check_set_error(error, ZATHURA_ERROR_NOT_IMPLEMENTED); return NULL; } - girara_list_t *result = - functions->document_get_information(document, document->data, error); + girara_list_t* result = functions->document_get_information(document, document->data, error); if (result != NULL) { - girara_list_set_free_function( - result, - (girara_free_function_t)zathura_document_information_entry_free); + girara_list_set_free_function(result, (girara_free_function_t) zathura_document_information_entry_free); } return result; } -zathura_plugin_t *zathura_document_get_plugin(zathura_document_t *document) { +zathura_plugin_t* +zathura_document_get_plugin(zathura_document_t* document) +{ if (document == NULL) { return NULL; } From 4041d786d5171902c229de97228046e877b638e9 Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Wed, 1 Dec 2021 20:35:44 +0100 Subject: [PATCH 08/12] Fixed the whitespace difference from upstream in adjustment.c. Praise VIM. Also checked out config.c, render.c doc/* and po/* from the upstream. --- doc/configuration/options.rst | 8 + doc/man/zathura.1.rst | 3 +- doc/man/zathurarc.5.rst | 41 +- po/ar.po | 299 +++++++------- po/ca.po | 304 +++++++------- po/cs.po | 299 +++++++------- po/de.po | 296 +++++++------- po/el.po | 304 +++++++------- po/eo.po | 304 +++++++------- po/es.po | 304 +++++++------- po/es_CL.po | 304 +++++++------- po/et.po | 326 ++++++++------- po/fr.po | 417 +++++++++++--------- po/he.po | 322 ++++++++------- po/hr.po | 322 ++++++++------- po/id_ID.po | 296 +++++++------- po/it.po | 305 +++++++------- po/lt.po | 296 +++++++------- po/nl.po | 301 +++++++------- po/no.po | 296 +++++++------- po/pl.po | 296 +++++++------- po/pt_BR.po | 296 +++++++------- po/ru.po | 303 +++++++------- po/sv.po | 299 +++++++------- po/ta_IN.po | 324 ++++++++------- po/tr.po | 304 +++++++------- po/uk_UA.po | 299 +++++++------- zathura/adjustment.c | 99 ++--- zathura/config.c | 17 +- zathura/render.c | 721 ++++++++++++++++++---------------- 30 files changed, 4466 insertions(+), 3839 deletions(-) diff --git a/doc/configuration/options.rst b/doc/configuration/options.rst index 2f99d13..a0d297b 100644 --- a/doc/configuration/options.rst +++ b/doc/configuration/options.rst @@ -43,6 +43,14 @@ General settings :type: String :default: #9FBC00 +.. describe:: highlight-fg + + Defines the color that is for text when highlighting parts of the document + (e.g.: numbers for links) + + :type: String + :default: #FFFFFF + .. describe:: highlight-active-color Defines the color that is used to show the current selected highlighted diff --git a/doc/man/zathura.1.rst b/doc/man/zathura.1.rst index a5766f4..089dbf7 100644 --- a/doc/man/zathura.1.rst +++ b/doc/man/zathura.1.rst @@ -225,7 +225,8 @@ close Close document exec - Execute an external command + Execute an external command. ``$FILE`` expands to the current document path, + and ``$PAGE`` to the current page number info Show document information diff --git a/doc/man/zathurarc.5.rst b/doc/man/zathurarc.5.rst index 3d031af..bf519ae 100644 --- a/doc/man/zathurarc.5.rst +++ b/doc/man/zathurarc.5.rst @@ -231,7 +231,8 @@ They can also be combined with modifiers: * ``exec``: - Execute an external command. + Execute an external command. ``$FILE`` expands to the current document path, + and ``$PAGE`` to the current page number. * ``focus_inputbar`` @@ -528,30 +529,6 @@ girara * Value type: String * Default value: #FFF712 -*tabbar-fg* - Defines the foreground color for a tab - - * Value type: String - * Default value: #FFFFFF - -*tabbar-bg* - Defines the background color for a tab - - * Value type: String - * Default value: #000000 - -*tabbar-focus-fg* - Defines the foreground color for the focused tab - - * Value type: String - * Default value: #9FBC00 - -*tabbar-focus-bg* - Defines the background color for the focused tab - - * Value type: String - * Default value: #000000 - *statusbar-bg* Defines the background color of the statusbar @@ -640,6 +617,13 @@ zathura * Value type: Boolean * Default value: true +*dbus-raise-window* + Defines whether zathura's window should be raised when receiving certain + commands via D-Bus. + + * Value type: Boolean + * Default value: true + *filemonitor* Defines the file monitor backend used to check for changes in files. Possible values are "glib", "signal" (if signal handling is supported), and "noop". The @@ -661,6 +645,13 @@ zathura * Value type: String * Default value: #9FBC00 +*highlight-fg* + Defines the color that is used for text when highlighting parts of the + document (e.g.: number for links). + + * Value type: String + * Default value: #9FBC00 + *highlight-active-color* Defines the color that is used to show the current selected highlighted element (e.g: current search result) diff --git a/po/ar.po b/po/ar.po index 6c8f6f7..6d017b2 100644 --- a/po/ar.po +++ b/po/ar.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: abouzakaria kov \n" "Language-Team: Arabic (http://www.transifex.com/pwmt/zathura/language/ar/)\n" "Language: ar\n" @@ -55,11 +55,6 @@ msgstr "سرعة العلامات والإشارات المرجعية." msgid "Automatic document reloading." msgstr "إعادة تحميل المستندات تلقائيًا." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "org.pwmt.zathura" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -71,35 +66,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "'%s' يجب ألا يكون 0. حدد 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "إدخال غير صالح '%s'." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "الفهرس غير صالح '%s'." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "نسخ النص المحدد للاختيار %s: %s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "نسخ الصورة المحددة للاختيار %s" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "لا يوجد وثيقة مفتوحة." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "عدد الوسائط غير صالح ." @@ -198,53 +193,45 @@ msgstr "لا معلمات مقدمة." msgid "Printing is not permitted in strict sandbox mode" msgstr "لا يُسمح بالطباعة في وضع الحماية الصارم" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "تم حفظ المستند." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "فشل في حفظ المستند." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "عدد الوسائط غير صالح ." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "تعذر كتابة المرفق '%s' إلى '%s' ." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "كتب المرفق '%s' إلى '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "كتبت الصورة '%s' إلى '%s' ." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "تعذر كتابة الصورة '%s' إلى '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "صورة غير معروفة '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "مرفق أو صورة غير معروف '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "التنفيذ غير مسموح به في وضع الحماية الصارم" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "يجب أن يكون الوسيط رقمًا." @@ -263,318 +250,326 @@ msgid "Images" msgstr "الصور" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "خلفية قاعدة البيانات" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "ملف شاشة الخلفية" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "خطوة التكبير" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "الحشو بين الصفحات" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "عدد الصفحات لكل صف" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "عمود الصفحة الأولى" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "تقديم الصفحات من اليمين إلى اليسار" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "خطوة التمرير" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "خطوة التمرير الأفقي" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "تداخل تمرير الصفحة كاملة " -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "تكبير الحد الأدنى" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "تكبير الحد الأقصى" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "الحد الأقصى لعدد الصفحات للاحتفاظ بها في ذاكرة التخزين المؤقت" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" "الحجم الأقصى بالبكسل من الصور المصغرة للاحتفاظ بها في ذاكرة التخزين المؤقت" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "عدد المواضع التي يجب تذكرها في قائمة التنقل" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "إعادة تلوين (اللون الداكن)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "إعادة تلوين (لون فاتح)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "لون التحويم" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "لون التحويم (نشط)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "'جارٍ التحميل...' لون خلفية " -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "'جارٍ التحميل' ... لون النص" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "لون النص لوضع الفهرسة " -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "لون الخلفية لوضع الفهرسة " -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "لون النص لوضع الفهرسة (العنصر النشط)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "لون الخلفية لوضع الفهرسة (العنصر النشط)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "إعادة تلوين الصفحات " -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "عندما يحافظ التلوين على اللون الأصلي ويضبط الخفة فقط" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "عندما يحافظ على إعادة تلوين وبحتفظ على الصورة الأصلية" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "التفاف التمرير" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "عدد الصفحات لكل صف" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "نكبير افقي من الوسط" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "تكبير عمودي من الوسط" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "محاذاة رابط الهدف إلى اليسار" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "السماح بتغيير التكبير عند الروابط التالية" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "توسيط النتيجة أفقيا" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "شفافية التحويم" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "التقدم \"جارٍ التحميل ...\"" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "اضبطه عند فتح الملف" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "إظهار الملفات والدلائل المخفية" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "عرض الدلائل" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "عرض الملفات الحديثة" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "فتح دائما على الصفحة الأولى" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "تمييز نتائج البحث" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "تمكين البحث المتزايد" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "مسح نتائج البحث عن الالغاء" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "استخدم اسم الملف الرئيسي في عنوان النافذة" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "استخدم ~ بدلاً من $HOME في اسم الملف في عنوان النافذة" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "عرض رقم الصفحة في عنوان النافذة" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "استخدم الصفحة الأولى من الوثيقة كرمز النافذة" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "استخدم الاسم الأساسي للملف في شريط الحالة" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "استخدم ~ بدلاً من $HOME في اسم الملف في شريط الحالة" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "تمكين دعم synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr " محرر أمر Synctex" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "تمكين خدمة D-Bus" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "حفظ التاريخ عند كل تغيير الصفحة" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "الحافظة التي سيتم كتابة البيانات المحددة الماوس" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "تمكين الإخطار بعد اختيار النص" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "مستوى الحماية" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "أضف إشارة مرجعية" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "حذف إشارة مرجعية" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "قائمة جميع الإشارات المرجعية" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "إغلاق الملف الحالي" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "عرض معلومات الملف" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "تنفيذ أمر" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "عرض المساعدة" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "فتح وثيقة" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "أغلق zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "طباعة المستند" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "احفظ المستند" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "حفظ المستند (وفرض الكتابة فوق)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "احفظ المرفقات" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "تعيين إزاحة الصفحة" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "اجعل الموقع الحالي داخل المستند" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "احذف العلامات المحددة" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "لا تبرز نتائج البحث الحالية" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "تمييز نتائج البحث الحالية" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "عرض معلومات الإصدار" @@ -596,79 +591,93 @@ msgstr "الرابط: الصفحة %d" msgid "Link: %s" msgstr "الرابط: : %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "الرابط: غير صالح" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "المسار إلى دليل التكوين" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "المسار إلى دليل البيانات" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "المسار إلى دليل ذاكرة التخزين المؤقت" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "الطريق إلى الأدلة التي تحتوي على الإضافات" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "كلمة مرور المستند" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "الذهاب إلى رقم الصفحة " -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "مستوى السجل (تصحيح ، معلومات ، تحذير ، خطأ)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "طباعة معلومات إلاصدار " -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "محرر Synctex (تم إعادة توجيهه إلى أمر synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "الانتقال إلى موضع synctex المحدد" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "تمييز على موضع معين في عملية معينة" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "البدء في وضع غير افتراضي" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "جارٍ التحميل ..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "انسخ الصورة" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "حفظ الصورة باسم" @@ -688,35 +697,51 @@ msgstr "فشل الطباعة: %s" msgid "Invalid adjust mode: %d" msgstr "وضع الضبط غير صالح: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "النمط غير موجود: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "لا يحتوي هذا المستند على أي فهرس" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[لا اسم]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "لا يمكن قراءة الملف من المصدر وكتابته إلى ملف مؤقت." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "تعذرت قراءة الملف من GIO ونسخه إلى ملف مؤقت." -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "أدخل كلمة المرور:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "نوع ملف غير مدعوم. الرجاء تثبيت المكون الإضافي اللازم." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "لا يحتوي المستند على أي صفحات" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "فشل في حفظ المستند." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "تم حفظ المستند." + +#~ msgid "org.pwmt.zathura" +#~ msgstr "org.pwmt.zathura" diff --git a/po/ca.po b/po/ca.po index 20f6d8a..4170cd7 100644 --- a/po/ca.po +++ b/po/ca.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Catalan (http://www.transifex.com/pwmt/zathura/language/ca/)\n" "Language: ca\n" @@ -52,11 +52,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -68,35 +63,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Entrada invàlida '%s'." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Índex invàlid '%s'." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "No s'ha obert cap document." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Nombre d'arguments invàlids." @@ -195,53 +190,45 @@ msgstr "Cap argument subministrat." msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Document desat." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "No s'ha pogut desar el document." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Nombre d'arguments invàlids." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "No s'ha pogut escriure el fitxer adjunt '%s' a '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "S'ha escrit el fitxer adjunt '%s' a '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "S'ha escrit la imatge '%s' a '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "No s'ha pogut escriure la imatge '%s' a '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Imatge desconeguda '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Imatge o fitxer adjunt desconegut '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "L'argument ha de ser un nombre." @@ -260,317 +247,325 @@ msgid "Images" msgstr "Imatges" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Base de dades de rerefons" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Pas d'ampliació" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Separació entre pàgines" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Nombre de pàgines per fila" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Columna de la primera pàgina" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Pas de desplaçament" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Pas de desplaçament horitzontal" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Superposició de pàgines completes de desplaçament" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Zoom mínim" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Zoom màxim" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Nombre de posicions per recordar al jumplist" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Recolorejant (color fosc)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Recolorejant (color clar)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Color de realçament" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "Color de realçament (activat)" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" -msgstr "" +msgid "Color for highlighting (active)" +msgstr "Color de realçament (activat)" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Recolorejant les pàgines" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "Quan recoloregis manté el to original i ajusta només la lluminositat" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Desplaçament recollit" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Desplaçament recollit" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Avançar nombre de pàgines per fila" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Zoom centrat horitzontalment" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Centra el resultat horitzontalment" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Transparència del realçat" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Renderitza 'Carregant ...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Ajustar al fitxer quan s'obri" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Mostra els directoris i fitxers ocults" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Mostra els directoris" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Obrir sempre la primera pàgina" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Realça els resultats de recerca" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Habilita la cerca incremental" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Esborra els resultats de recerca a l'interrompre" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Utilitza el nom base del fitxer en el títol de la finestra" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Habilitar la compatibilitat amb synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Afegir un marcador" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Esborrar un marcador" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Llista tots els marcadors" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Tancar el fitxer actual" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Mostra informació sobre el fitxer" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Executar una comanda" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Mostrar l'ajuda" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Obrir document" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Tancar Zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Imprimir document" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Desar document" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Desar document (i forçar la sobreescritura)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Desa els fitxers adjunts" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Assigna el desplaçament de pàgina" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Marca la posició actual dins el document" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Esborrar les marques especificades" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "No realcis els resultats de la recerca actual" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Realça els resultats de recerca actual" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Mostra informació sobre la versió" @@ -592,79 +587,93 @@ msgstr "Enllaçar: pàgina %d" msgid "Link: %s" msgstr "Enllaç: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Enllaç: Invàlid" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Reassigna a la finestra especificada per xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Ruta al directori de configuració" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Camí al directori de dades" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Camí al directori que conté els plugins" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Bifurca en segon pla" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Contrasenya del document" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Nivell de registre (depuració, informació, advertiments, errors)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Imprimeix informació sobre la versió" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Editor synctex (reenviat a l'ordre synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Carregant..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Copia la imatge" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Desa imatge com a" @@ -684,35 +693,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Aquest document no conté cap índex" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Sense nom]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "No s'ha pogut desar el document." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Document desat." diff --git a/po/cs.po b/po/cs.po index 35e7e50..233573f 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Czech (http://www.transifex.com/pwmt/zathura/language/cs/)\n" "Language: cs\n" @@ -56,11 +56,6 @@ msgstr "Rychlé značky a záložky." msgid "Automatic document reloading." msgstr "Automatické znovunahrání dokumentu." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "org.pwmt.zathura" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -72,35 +67,35 @@ msgstr "PDF;PS;PostScript;DjVU;dokument;představení;prohlížeč;" msgid "'%s' must not be 0. Set to 1." msgstr "'%s' nesmí být 0. Nastaveno na 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Neplatný vstup: %s" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Neplatný rejstřík: %s" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "Vybraný text zkopírován do výběru %s: %s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "Vybraný text zkopírován do výběru %s" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Není otevřený žádný dokument." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Špatný počet argumentů." @@ -199,53 +194,45 @@ msgstr "Nezadali jste argumenty." msgid "Printing is not permitted in strict sandbox mode" msgstr "Tisk není v režimu přísného pískoviště dovolen" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Dokument uložen." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Nepovedlo se uložit dokument." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Špatný počet argumentů." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Nepovedlo se zapsat přílohu '%s' do '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Příloha '%s' zapsána do '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Obrázek '%s' zapsán do '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Nepovedlo se zapsat obrázek '%s' do '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Neznámý obrázek '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Neznámá příloha nebo obrázek '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Argumentem musí být číslo." @@ -264,317 +251,325 @@ msgid "Images" msgstr "Obrázky" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Databázová vrstva" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "Vrstva pro sledování souboru" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Velikost kroku zvětšení" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Mezery mezi stránkami" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Počet stran na řádek" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Sloupec první strany" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Velikost kroku posunu" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Velikost kroku vodorovného posunu" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Překrývání při posunování celých stran" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Nejmenší stupeň zvětšení" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Největší stupeň zvětšení" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Největší počet stran ve vyrovnávací paměti" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "Největší velikost náhledů v obrazových bodech ve vyrovnávací paměti" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Počet poloh k uchování v seznamu" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Přebarvuje se do tmava" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Přebarvuje se do světla" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Barva zvýrazňovače" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Barva zvýrazňovače (činná)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "Nahrává se barva pozadí..." -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "Nahrává se barva popředí..." -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Barva popředí režimu rejstříku" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Barva pozadí režimu rejstříku" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Barva popředí režimu rejstříku (činný prvek)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Barva pozadí režimu rejstříku (činný prvek)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Přebarvit stránky" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "Při přebarvování zachovat původní odstín a přizpůsobit pouze světlost" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "Při přebarvování zachovat původní barvy obrázku" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Posunovat přes konce" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Posunovat s ohledem na strany" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Pokračovat v počtu stran v jednom řádku" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Vodorovně vystředěné přiblížení" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "Vystředit strany svisle" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Zarovnat cíl odkazu nalevo" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Při následování odkazů se mění velikost přiblížení" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Vystředit výsledky vodorovně" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Průhlednost při zvýrazňování" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Vypisovat Nahrává se..." -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Přiblížení po otevření souboru" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Zobrazovat skryté soubory" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Ukázat adresáře" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "Ukázat nedávné soubory" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Vždy otevírat na první straně" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Zvýrazňovat výsledky hledání" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Povolit přírůstkové hledání" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Při přerušení smazat výsledky hledání" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Použít základní název souboru v názvu okna" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "Použít ~ místo $HOME v souborovém názvu v názvu okna" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Zobrazit číslo strany v názvu okna" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Použít základní název souboru ve stavovém řádku" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "Použít ~ místo $HOME v souborovém názvu ve stavovém řádku" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Povolit podporu pro synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Příkaz pro editor Synctex" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Povolit službu D-Bus" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "Uložit historii při každé změně strany" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "Schránka, do níž budou zapsána data vabraná pomocí myši" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Povolit oznámení po vybrání textu" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "Úroveň pískoviště" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Přidat záložku" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Smazat záložku" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Vypsat všechny záložky" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Zavřít nynější soubor" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Ukázat informace o souboru" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Spustit příkaz" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Ukázat nápovědu" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Otevřít dokument" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Zavřít zathuru" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Vytisknout dokument" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Uložit dokument" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Uložit dokument a vynutit jeho přepsání" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Uložit přílohy" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Nastavit posun strany" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Označit současnou polohu v dokumentu" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Smazat vybrané značky" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Nezvýrazňovat výsledky tohoto hledání" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Zvýrazňovat výsledky tohoto hledání" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Ukázat údaj o verzi" @@ -596,79 +591,93 @@ msgstr "Odkaz: strana %d" msgid "Link: %s" msgstr "Odkaz: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Odkaz: Neplatný" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Propojí s oknem udaným xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Cesta k adresáři se souborem s nastavením" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Cesta k adresáři s daty" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Cesta k adresáři s vyrovnávací pamětí" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Cesta k adresářům s přídavnými moduly" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Forknout se na pozadí" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Heslo k dokumentu" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Číslo strany, na kterou jít" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Úroveň logování (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Zobrazit údaje o verzi" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Editor Synctex (předáno příkazu synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Přesunout se na udanou polohu synctex" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Zvýraznit zadanou polohu v daném procesu" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Spustit v ne-výchozím režimu" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Nahrává se..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Kopírovat obrázek" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Uložit obrázek jako" @@ -688,38 +697,54 @@ msgstr "Nepodařilo se vytisknout: %s" msgid "Invalid adjust mode: %d" msgstr "Neplatný režim úprav: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "Vzor nenalezen: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Tento dokument neobsahuje žádný rejstřík" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Nepojmenovaný]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" "Nepodařilo se přečíst soubor z stdin a zapsat jej do dočasného souboru." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" "Nepodařilo se přečíst soubor z GIO a zkopírovat jej do dočasného souboru." -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "Zadat heslo:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" "Nepodporovaný typ souboru. Nainstalujte, prosím, nezbytný přídavný modul." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Dokument neobsahuje žádné strany" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Nepovedlo se uložit dokument." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Dokument uložen." + +#~ msgid "org.pwmt.zathura" +#~ msgstr "org.pwmt.zathura" diff --git a/po/de.po b/po/de.po index 6d6fccb..7b27a67 100644 --- a/po/de.po +++ b/po/de.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-24 21:36+0200\n" -"PO-Revision-Date: 2020-07-27 08:12+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2021-07-14 17:35+0200\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: German (http://www.transifex.com/pwmt/zathura/language/de/)\n" "Language: de\n" @@ -58,11 +58,6 @@ msgstr "Markierungen und Lesezeichen." msgid "Automatic document reloading." msgstr "Automatisches Neuladen von Dokumenten." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -74,35 +69,35 @@ msgstr "PDF;Ps;PostScript;DjVU;Dokumente;Presentation;Betrachter;" msgid "'%s' must not be 0. Set to 1." msgstr "'%s' darf nicht 0 sein. Auf 1 gesetzt." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Ungültige Eingabe '%s' angegeben." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Ungültiger Index '%s' angegeben." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "Der gewählte Text wurde in die Zwischenablage %s kopiert: %s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "Das gewählte Bild wurde in die Zwischenablage %s kopiert" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Kein Dokument geöffnet." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Ungültige Anzahl an Argumenten angegeben." @@ -201,53 +196,45 @@ msgstr "Keine Argumente angegeben." msgid "Printing is not permitted in strict sandbox mode" msgstr "Im strikten Sandkastenmodus ist Drucken nicht erlaubt" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Dokument gespeichert." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Konnte Dokument nicht speichern." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Ungültige Anzahl an Argumenten." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Konnte Anhang '%s' nicht nach '%s' schreiben." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Anhang '%s' nach '%s' geschrieben." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Anhang '%s' nach '%s' geschrieben." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Konnte Anhang '%s' nicht nach '%s' schreiben." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Unbekanntes Bild '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Unbekannter Anhanng oder Bild '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "Im strikten Sandkastenmodus ist Anwendungen ausführen nicht erlaubt" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Das Argument ist keine Zahl." @@ -266,320 +253,328 @@ msgid "Images" msgstr "Bilder" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Datenbank Backend" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "Dateiwächter Backend" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Vergrößerungsstufe" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Abstand zwischen den Seiten" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Anzahl der Seiten in einer Reihe" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Spalte der ersten Seite" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "Stelle Seiten von rechts nach links dar" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Schrittgröße beim Scrollen" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Horizontale Schrittgröße beim Scrollen" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Überlappung beim Scrollen von ganzen Seiten" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Minimale Vergrößerungsstufe" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Maximale Vergrößerungsstufe" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Maximale Seitenzahl im Zwischenspeicher" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "Maximale Größe der Vorschau im Zwischenspeicher (in Pixel)" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Anzahl der Liste zu behaltenden Positionen" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Neufärben (Dunkle Farbe)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Neufärben (Helle Farbe)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Farbe für eine Markierung" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "Vordergrund für eine Markierung" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Farbe für die aktuelle Markierung" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "Hintergrundfarbe von 'Lädt...'" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "Vordergrundfarbe von 'Lädt...'" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Vordergrundfarbe des Indexmodus" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Hintergrundfarbe des Indexmodus" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Vordergrundfarbe des Indexmodus (aktives Element)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Hintergrundfarbe des Indexmodus (aktives Element)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Färbe die Seiten ein" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" "Behalte beim Neufärben den ursprünglichen Farbton bei und passe nur die " "Helligkeit an" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" "Bilder bleiben unverändert, wenn das Einfärben des Dokuments aktiviert ist" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Scroll-Umbruch" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Seiten beim Scrollen beachten" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Gehe Anzahl der Seiten in einer Reihe weiter" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Horizontal zentrierter Zoom" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "Zentriere Seiten vertikal" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Linkziel links ausrichten" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Erlaube Zoom-Änderungen beim Folgen von Links" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Zentriere Ergebnis horizontal" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Transparenz für Markierungen" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Zeige 'Lädt...'-Text beim Zeichnen einer Seite" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Seite einpassen" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Zeige versteckte Dateien und Ordner an" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Zeige Ordner an" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "Zeige zuletzt geöffnete Dateien an" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Öffne Dokument immer auf der ersten Seite" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Hebe Suchergebnisse hervor" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Aktiviere inkrementelle Suche" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Lösche Suchergebnisse bei Abbruch" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Verwende den Dateinamen der Datei im Fenstertitel" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "Verwende ~ statt $HOME im Dateinamen im Fenstertitel" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Verwende die Seitenzal im Fenstertitel" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "Verwende erste Seite des Dokuments als Fenstersymbol" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Verwende den Dateinamen der Datei in der Statusleiste" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "Verwende ~ statt $HOME im Dateinamen in der Statusleiste" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Aktiviere SyncTeX-Unterstützung" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Synctex Editor Befehl" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "D-Bus-Dienst aktivieren" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "Hebe Fenster bei verschiedenen D-Bus Kommandos hervor" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "Speichere Verlauf bei jedem Seitenwechsel" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "Zwischenablage, in die mit der Maus gewählte Text kopiert wird" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Benachrichtigung nach Text-Selektion" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "Sandkasten-Niveau" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Füge Lesezeichen hinzu" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Lösche ein Lesezeichen" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Liste all Lesezeichen auf" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Schließe das aktuelle Dokument" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Zeige Dokumentinformationen an" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Führe einen Befehl aus" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Zeige Hilfe an" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Öffne Dokument" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Beende zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Drucke Dokument" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Speichere Dokument" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Speichere Dokument (und überschreibe bestehende)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Speichere Anhänge" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Setze den Seitenabstand" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Markiere aktuelle Position im Doukument" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Lösche angegebene Markierung" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Hebe aktuelle Suchergebnisse nicht hervor" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Hebe aktuelle Suchergebnisse hervor" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Zeige Versionsinformationen an" @@ -602,79 +597,93 @@ msgstr "Verknüpfung: Seite %d" msgid "Link: %s" msgstr "Verknüpfung: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Verknüpfung: ungültig" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "Seitennummer kopiert: %d" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "Link kopiert: %d" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Reparentiert zathura an das Fenster mit der xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Pfad zum Konfigurationsverzeichnis" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Pfad zum Datenverzeichnis" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Pfad zum Cacheverzeichnis" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Pfad zum Pluginverzeichnis" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Forkt den Prozess in den Hintergrund" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Dokument Passwort" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Zur Seite springen" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Log-Stufe (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Zeige Versionsinformationen an" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Synctex Editor (wird an synctex weitergeleitet)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Zur gewählten SyncTeX-Position springen" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Gewählte Position im Prozess hervorheben" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "In einem Nicht-Standardmodus starten" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "Zu Lesezeichen springen" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "Suche nach der gegeben Phrase und anzeigen der Ergebnisse" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Lädt..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Bild kopieren" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Bild speichern als" @@ -694,35 +703,48 @@ msgstr "Drucken fehlgeschlagen: %s" msgid "Invalid adjust mode: %d" msgstr "Ungültiger Anpassungsmodus: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "Suchausdruck nicht gefunden: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Dieses Dokument beinhaltet kein Inhaltsverzeichnis" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Kein Name]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "Konnte Datei nicht von stdin lesen und in temporäre Datei schreiben." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "Konnte Datei nicht mittels GIO in temporäre Datei kopieren." -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "Passwort:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Dateityp ist nicht unterstützt. Installiere das benötigete Plugin." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Dieses Dokument beinhaltet keine Seiten" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "Datei existiert bereits: %s. Nutze :write! um sie zu überschreiben." + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Konnte Dokument nicht speichern." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Dokument gespeichert." diff --git a/po/el.po b/po/el.po index b62be2c..a6ac8ce 100644 --- a/po/el.po +++ b/po/el.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Greek (http://www.transifex.com/pwmt/zathura/language/el/)\n" "Language: el\n" @@ -52,11 +52,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -68,35 +63,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Η είσοδος '%s' είναι άκυρη." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Ο δείκτης '%s' είναι άκυρος." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Δεν άνοιξε κανένα αρχείο. " -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Μη έγκυρος αριθμός παραμέτρων." @@ -195,53 +190,45 @@ msgstr "Δεν εισήχθησαν παράμετροι. " msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Το αρχείο αποθηκεύτηκε." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Η αποθήκευση του αρχείου απέτυχε. " - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Μη έγκυρος ο αριθμός των παραμέτρων. " -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Μη επιτυχής η εγγραγή της προσάρτησης '%s' στην '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Επιτυχής η εγγραφή της προσάρτησης '%s' στην '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Ενεγράφει η εικόνα '%s' στην '%s'" -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Δεν ενεγράφει η εικόνα '%s' στην '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Άγνωστη εικόνα '%s'. " -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Άγνωστο προσάρτημα είτε εικόνα '%s'. " -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Η παράμετρος πρέπει να είναι αριθμός." @@ -260,319 +247,327 @@ msgid "Images" msgstr "Εικόνες" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Το βασικό εργαλείο της βάσης δεδομένων" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Βήμα μεγέθυνσης" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Διάκενο μεταξύ σελίδων" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Αριθμός σελίδων ανά γραμμή" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Στήλη της πρώτης σελίδας" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Βήμα κύλισης" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Βήμα οριζόντιας κύλησης" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Ελάχιστη μεγέθυνση" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Μέγιστη μεγέθυνση" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Επαναχρωματισμός (σκούρο χρώμα)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Επαναχρωματισμός (ανοικτό χρώμα)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Χρώμα τονισμού" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "Χρώμα τονισμού (ενεργό)" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" -msgstr "" +msgid "Color for highlighting (active)" +msgstr "Χρώμα τονισμού (ενεργό)" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Επαναχρωματισμός σελίδων" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" "Κατά τον επαναχρωματισμό της σελιδάς διατήρηση της αρχικής απόχρωσης και " "αλλαγή μόνο της φωτεινότητας" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Κυκλική κύληση" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Προώθηση σε αριθμό σελίδων ανά γραμμή" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Μεγένθηση οριζοντίως κεντραρισμένη" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Οριζόντιο κεντράρισμα αποτελεσμάτων" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Διαφάνεια για τονισμό" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Εμφάνιση της ένδειξης 'Φορτώνει ...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Προσαρμογή κατά το άνοιγμα του αρχείου" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Εμφάνιση κρυφών αρχείων και φακέλων" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Εμφάνιση καταλόγων" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Άνοιγμα πάντα στην πρώτη σελίδα" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Τονισμός αποτελεσμάτων αναζήτησης" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Εκκαθάριση των απολεσμάτων αναζήτησης κατά την διακοπή" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Χρήση του ονόματος του αρχείο στο τίτλο του παραθύρου" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Ενεργοποίηση υποστήριξης synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Προσθήκη σελιδοδείκτη" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Διαγραφή σελιδοδείκτη" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Εμφάνιση όλων των σελιδοδεικτών" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Κλείσιμο αρχείου" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Προβολή πληροφοριών αρχείου" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Εκτέλεση εντολής" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Εμφάνιση βοήθειας" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Άνοιγμα αρχείου" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Κλείσιμο" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Εκτύπωση αρχείου" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Αποθήκευση αρχείου" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Αποθήκευση αρχείου (και αντικατάσταση)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Αποθήκευση προσαρτήσεων. " -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Ρύθμιση αντιστάθμισης σελίδας" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Επισήμανση τρέχουσας θέσης στο κείμενο" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Διαγραφή επιλεγμένων σημείων" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Χωρίς τονισμό τα τρέχοντα αποτελέσματα της αναζήτησης" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Τονισμός στα τρέχοντα αποτελέσματα της αναζήτησης" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Εμφάνιση πληροφοριών έκδοσης" @@ -594,79 +589,93 @@ msgstr "" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Διαδρομή του αρχείου ρυθμίσεων" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Διαδρομή του φακέλου δεδομένων" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Διαδρομή φακέλου που περιέχει τα πρόσθετα" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Διακλάδωση στο παρασκήνιο" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Κωδικός αρχείου" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Επίπεδο καταγραφής (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Εκτύπωση πληροφοριών έκδοσης" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Synctex editor (Προώθηση στην εντολή synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Φορτώνει ..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Αντιγραφή εικόνας" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Αποθήκευση εικόνας ως..." @@ -686,35 +695,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Το αρχείο δεν περιέχει κανένα δείκτη" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Χωρίς όνομα]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Η αποθήκευση του αρχείου απέτυχε. " + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Το αρχείο αποθηκεύτηκε." diff --git a/po/eo.po b/po/eo.po index 865e820..329f9ec 100644 --- a/po/eo.po +++ b/po/eo.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Esperanto (http://www.transifex.com/pwmt/zathura/language/" "eo/)\n" @@ -52,11 +52,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -68,35 +63,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Nevalida enigo '%s' uzata." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Nevalida indekso '%s' uzata." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Neniu dokumento malfermita." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Nevalida nombro da argumentoj uzata." @@ -195,53 +190,45 @@ msgstr "Neniuj argumentoj uzata." msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Dokumento konservita." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Neeble konservi dokumenton." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Nevalida nombro da argumentoj." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Neeble skribi kunsendaĵon '%s' en '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Skribis kunsendaĵon '%s' en '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Skribis kunsendaĵon '%s' en '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Neeble skribi kunsendaĵon '%s' en '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Nekonata bildo '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Argumento devas esti nombro." @@ -260,317 +247,325 @@ msgid "Images" msgstr "Bildoj" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Zompaŝo" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Interpaĝa plenigo" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Nombro da paĝoj po vico" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Rulumpaŝo" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Mimimuma zomo" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Maksimuma zomo" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Rekolorigo (malhela koloro)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Rekolorigo (hela koloro)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Koloro por fonlumo" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "Koloro por fonlumo (aktiva)" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" -msgstr "" +msgid "Color for highlighting (active)" +msgstr "Koloro por fonlumo (aktiva)" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Rekoloru paĝojn" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Ĉirkaŭflua rulumado" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Travidebleco por fonlumo" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Bildigu 'Ŝargado ...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Adaptaĵo ĉe malfermo de dosiero" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Montru kaŝitajn dosierojn kaj -ujojn" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Montru dosierujojn" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Ĉiam malfermu ĉe unua paĝo" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Aldonu paĝosignon" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Forigu paĝosignon" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Listigu ĉiujn paĝosignojn" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Fermu nunan dosieron" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Montru dosiera informacio" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Montru helpon" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Malfermu dokumenton" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Fermu zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Presu dokumenton" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Konservu dokumenton" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Konservu dokumenton (deviga anstataŭo)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Konservu kunsendaĵojn" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Agordu paĝdelokado" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "" @@ -592,79 +587,93 @@ msgstr "" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Vojo al la agorda dosierujo" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Vojo al la datuma dosierujo" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Vojoj al dosierujoj enhavantaj kromaĵojn" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Nivelo de ĵurnalo (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Montru dosiera informacio" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Ŝargado ..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Kopiu bildon" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Savi bildojn kiel" @@ -684,35 +693,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Ĉi-tiu dokumento enhavas neniam indekson." -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Neniu nomo]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Neeble konservi dokumenton." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Dokumento konservita." diff --git a/po/es.po b/po/es.po index 2b96fc6..7d656f0 100644 --- a/po/es.po +++ b/po/es.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Spanish (http://www.transifex.com/pwmt/zathura/language/es/)\n" "Language: es\n" @@ -50,11 +50,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -66,35 +61,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Entrada inválida: '%s'." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Índice invalido: '%s'." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Ningún documento abierto." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Número de argumentos inválido." @@ -193,53 +188,45 @@ msgstr "Ningún argumento recibido." msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Documento guardado." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Error al guardar el documento." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Número de argumentos inválido." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Escrito fichero adjunto '%s' a '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Escrito fichero adjunto '%s' a '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Imagen desconocida '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Adjunto o imagen desconocidos '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "El argumento ha de ser un número." @@ -258,319 +245,327 @@ msgid "Images" msgstr "Imágenes" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Base de datos" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Unidad de zoom" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Separación entre páginas" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Número de páginas por fila" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Columna de la primera página" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Paso de desplazamiento" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Paso de desplazamiento horizontal" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Solapamiento del desplazamiento de página" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Zoom mínimo" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Zoom máximo" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Número de posiciones a recordar en la lista de saltos" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Recoloreado (color oscuro)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Recoloreado (color claro)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Color para destacar" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "Color para destacar (activo)" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" -msgstr "" +msgid "Color for highlighting (active)" +msgstr "Color para destacar (activo)" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Recolorear páginas" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" "Cuando se recoloree, mantener el tono original y ajustar únicamente la " "luminosidad" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Navegación/Scroll cíclica/o" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Zoom centrado horizontalmente" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Centrar el resultado horizontalmente" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Transparencia para el destacado" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Renderizado 'Cargando ...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Ajustarse al abrir un fichero" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Mostrar directorios y ficheros ocultos" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Mostrar directorios" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Abrir siempre la primera página" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Destacar los resultados de búsqueda" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Habilitar la búsqueda incremental" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Borrar resultados de búsqueda al abortar" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Usar el nombre del archivo en el título de la ventana" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Habilitar soporte synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Añadir Favorito" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Eliminar Favorito" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Listar favoritos" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Cerrar fichero actual" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Mostrar información del fichero" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Ejecutar un comando" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Mostrar ayuda" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Abrir documento" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Salir de zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Imprimir documento" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Guardar documento" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Guardar documento (y sobreescribir)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Guardar ficheros adjuntos" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Asignar el desplazamiento de página" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Marcar la posición actual en el documento" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Borrar las marcas especificadas" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "No destacar los resultados de la búsqueda actual" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Destacar los resultados de la búsqueda actual" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Mostrar versión" @@ -592,79 +587,93 @@ msgstr "" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Reasignar a la ventana especificada por xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Ruta al directorio de configuración" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Ruta para el directorio de datos" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Ruta a los directorios que contienen los plugins" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Fork, ejecutándose en background" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Contraseña del documento" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Nivel de log (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Mostrar información del fichero" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Editor de Synctex (reenvíado al commando synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Cargando ..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Copiar imagen" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Salvar imagen como" @@ -684,35 +693,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Este documento no contiene ningún índice" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Sin nombre]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Error al guardar el documento." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Documento guardado." diff --git a/po/es_CL.po b/po/es_CL.po index 18b2731..2f91736 100644 --- a/po/es_CL.po +++ b/po/es_CL.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Spanish (Chile) (http://www.transifex.com/pwmt/zathura/" "language/es_CL/)\n" @@ -52,11 +52,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -68,35 +63,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Entrada inválida: '%s'." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Índice invalido: '%s'." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Ningún documento abierto." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Número de argumentos inválido." @@ -195,53 +190,45 @@ msgstr "Ningún argumento recibido." msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Documento guardado." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Error al guardar el documento." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Número de argumentos inválido." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Fichero adjunto escrito '%s' a '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Fichero adjunto escrito '%s' a '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "No se pudo escribir el fichero adjunto '%s' a '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "" -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "El argumento debe ser un número." @@ -260,317 +247,325 @@ msgid "Images" msgstr "" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Fin de la base de datos." -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Unidad de zoom" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Separación entre páginas" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Numero de páginas por fila" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Unidad de desplazamiento" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Zoom mínimo" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Zoom máximo" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Recolorando (color oscuro)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Recolorando (color claro)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Color para destacar" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "Color para destacar (activo)" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" -msgstr "" +msgid "Color for highlighting (active)" +msgstr "Color para destacar (activo)" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Recolorar páginas" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Scroll cíclico" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Transparencia para lo destacado" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Renderizando 'Cargando...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Ajustar al abrirse un archivo" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Mostrar archivos ocultos y directorios" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Mostrar directorios" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Siempre abrir en primera página" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Agregar un marcador" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Eliminar un marcador" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Listar todos los marcadores" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Cerrar archivo actual" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Mostrar información del archivo" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Mostrar ayuda" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Abrir documento" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Cerrar zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Imprimir documento" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Guardar documento" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Guardar documento (y forzar sobreescritura)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Guardar archivos adjuntos" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Asignar desplazamiento de la página" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "" @@ -592,79 +587,93 @@ msgstr "" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Reasignar a la ventana especificada por xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Ruta al directorio de configuración" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Ruta al directorio de datos" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Ruta al directorio que contiene plugins" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Ejecución en background" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Nivel de log (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Mostrar información del archivo" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Cargando..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Copiar imagen" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "" @@ -684,35 +693,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Este document no contiene índice" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Sin nombre]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Error al guardar el documento." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Documento guardado." diff --git a/po/et.po b/po/et.po index 05debac..9bc202a 100644 --- a/po/et.po +++ b/po/et.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Estonian (http://www.transifex.com/pwmt/zathura/language/" "et/)\n" @@ -52,11 +52,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -68,35 +63,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "" -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "" @@ -195,53 +190,45 @@ msgstr "" msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "" - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "" - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "" -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "" -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "" -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "" -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "" -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "" -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "" @@ -260,317 +247,325 @@ msgid "Images" msgstr "" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Esiletõstmise värv" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "Esiletõstmise värv (aktiivne)" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" -msgstr "" +msgid "Color for highlighting (active)" +msgstr "Esiletõstmise värv (aktiivne)" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Näita kaustasid" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Ava alati esimene leht" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Lisa järjehoidja" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Kustuta järjehoidja" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Näita kõiki järjehoidjaid" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Sulge praegune fail" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Näita faili infot" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Näita abiinfot" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Ava dokument" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Sule zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Prindi dokument" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Salvesta dokument" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Salvesta manused" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "" @@ -592,79 +587,93 @@ msgstr "" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "" -#: zathura/main.c:146 -msgid "Reparents to window specified by xid (X11)" +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" msgstr "" -#: zathura/main.c:147 -msgid "Path to the config directory" -msgstr "" - -#: zathura/main.c:148 -msgid "Path to the data directory" -msgstr "" - -#: zathura/main.c:149 -msgid "Path to the cache directory" -msgstr "" - -#: zathura/main.c:150 -msgid "Path to the directories containing plugins" +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" msgstr "" #: zathura/main.c:151 -msgid "Fork into the background" +msgid "Reparents to window specified by xid (X11)" msgstr "" #: zathura/main.c:152 -msgid "Document password" +msgid "Path to the config directory" msgstr "" #: zathura/main.c:153 -msgid "Page number to go to" +msgid "Path to the data directory" msgstr "" #: zathura/main.c:154 -msgid "Log level (debug, info, warning, error)" +msgid "Path to the cache directory" msgstr "" #: zathura/main.c:155 -msgid "Print version information" -msgstr "Näita faili infot" +msgid "Path to the directories containing plugins" +msgstr "" #: zathura/main.c:156 -msgid "Synctex editor (forwarded to the synctex command)" +msgid "Fork into the background" msgstr "" #: zathura/main.c:157 -msgid "Move to given synctex position" +msgid "Document password" msgstr "" #: zathura/main.c:158 -msgid "Highlight given position in the given process" +msgid "Page number to go to" msgstr "" #: zathura/main.c:159 -msgid "Start in a non-default mode" +msgid "Log level (debug, info, warning, error)" msgstr "" #: zathura/main.c:160 +msgid "Print version information" +msgstr "Näita faili infot" + +#: zathura/main.c:161 +msgid "Synctex editor (forwarded to the synctex command)" +msgstr "" + +#: zathura/main.c:162 +msgid "Move to given synctex position" +msgstr "" + +#: zathura/main.c:163 +msgid "Highlight given position in the given process" +msgstr "" + +#: zathura/main.c:164 +msgid "Start in a non-default mode" +msgstr "" + +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "" -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Kopeeri pilt" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "" @@ -684,35 +693,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Nime pole]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "" + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "" diff --git a/po/fr.po b/po/fr.po index 7cb1de2..e023c38 100644 --- a/po/fr.po +++ b/po/fr.po @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Zlib # # Translators: +# Benjamin Betti , 2020 # bknecht , 2012 # Dorian , 2012,2014 # Quentin Stiévenart , 2012 @@ -11,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" -"Last-Translator: Sebastian Ramacher \n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-11-08 00:03+0000\n" +"Last-Translator: Benjamin Betti \n" "Language-Team: French (http://www.transifex.com/pwmt/zathura/language/fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" @@ -36,111 +37,112 @@ msgid "" "mainly focuses on keyboard interaction. Zathura makes it possible to " "completely view and navigate through documents without using a mouse." msgstr "" +"Zathura est un visionneur de documents très fonctionnel et personnalisable. " +"Il fournit une interface minimaliste et peu encombrante ainsi qu'une " +"utilisation centrée sur l'utilisation du clavier. Zathura permet de " +"visionner et de parcourir des documents sans jamais utiliser la souris. " #: data/org.pwmt.zathura.appdata.xml.in:17 msgid "" "Zathura can be extended to support multiple document formats using plugins. " "Other features include:" msgstr "" +"Zathura peut être étendu par des greffons afin de gérer de multiples formats " +"de documents. Ses autres fonctionnalités incluent:" #: data/org.pwmt.zathura.appdata.xml.in:22 msgid "SyncTeX forward and backward synchronization support." -msgstr "" +msgstr "Synchronisation bidirectionnelle avec SyncTeX." #: data/org.pwmt.zathura.appdata.xml.in:23 msgid "Quickmarks and bookmarks." -msgstr "" +msgstr "Raccourcis et favoris." #: data/org.pwmt.zathura.appdata.xml.in:24 msgid "Automatic document reloading." -msgstr "" - -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" +msgstr "Rafraîchissement automatique des documents." #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 msgid "PDF;PS;PostScript;DjVU;document;presentation;viewer;" -msgstr "" +msgstr "PDF;PS;PostScript;DjVU;document;présentation;visionneur;" #: zathura/callbacks.c:310 #, c-format msgid "'%s' must not be 0. Set to 1." -msgstr "" +msgstr "'%s' ne peut valoir 0. Réglé sur 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Entrée invalide : '%s'" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Index invalide : '%s'" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" -msgstr "" +msgstr "Texte sélectionné copié dans la sélection %s:%s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" -msgstr "" +msgstr "Image sélectionnée copiée dans la sélection %s" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Aucun document ouvert." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Nombre d'arguments invalide." #: zathura/commands.c:53 #, c-format msgid "Could not update bookmark: %s" -msgstr "Impossible de créer le marque-page : %s" +msgstr "Impossible de mettre à jour le favori : %s" #: zathura/commands.c:55 #, c-format msgid "Could not create bookmark: %s" -msgstr "Impossible de créer le marque-page : %s" +msgstr "Impossible de créer le favori : %s" #: zathura/commands.c:60 #, c-format msgid "Bookmark successfully updated: %s" -msgstr "Marque page mis à jour avec succès : %s" +msgstr "Favori mis à jour avec succès : %s" #: zathura/commands.c:62 #, c-format msgid "Bookmark successfully created: %s" -msgstr "Marque page créé avec succès : %s" +msgstr "Favori créé avec succès : %s" #: zathura/commands.c:88 #, c-format msgid "Removed bookmark: %s" -msgstr "Marque page supprimé : %s" +msgstr "Favori supprimé : %s" #: zathura/commands.c:90 #, c-format msgid "Failed to remove bookmark: %s" -msgstr "Échec lors de la suppression du marque-page : %s" +msgstr "Échec lors de la suppression du favori : %s" #: zathura/commands.c:119 msgid "No bookmarks available." -msgstr "" +msgstr "Aucun favori disponible." #: zathura/commands.c:129 #, c-format msgid "No such bookmark: %s" -msgstr "Aucun marque-page correspondant : %s" +msgstr "Aucun favori correspondant : %s" #: zathura/commands.c:175 msgid "Title" @@ -176,11 +178,11 @@ msgstr "Date de modification" #: zathura/commands.c:183 msgid "Format" -msgstr "" +msgstr "Format" #: zathura/commands.c:184 msgid "Other" -msgstr "" +msgstr "Autres" #: zathura/commands.c:189 zathura/commands.c:209 msgid "No information available." @@ -196,55 +198,47 @@ msgstr "Aucun argument passé." #: zathura/commands.c:286 msgid "Printing is not permitted in strict sandbox mode" -msgstr "" +msgstr "L'impression n'est pas autorisée en mode d'isolation stricte" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Document enregistré." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Échec lors de l'enregistrement du document." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Nombre d'arguments invalide." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Impossible d'écrire la pièce jointe '%s' dans '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Pièce jointe '%s' écrite dans '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Image '%s' écrite dans '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Impossible d'écrire l'image '%s' dans '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Image '%s' inconnue." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Pièce jointe ou image '%s' inconnue." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" -msgstr "" +msgstr "Exec n'est pas autorisé en mode d'isolation stricte" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "L'argument doit être un nombre." @@ -263,319 +257,330 @@ msgid "Images" msgstr "Images" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Gestionnaire de base de données" -#: zathura/config.c:184 -msgid "File monitor backend" -msgstr "" - #: zathura/config.c:186 +msgid "File monitor backend" +msgstr "Service de surveillance des fichiers" + +#: zathura/config.c:188 msgid "Zoom step" msgstr "Incrément de zoom" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Espacement entre les pages" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Nombre de page par rangée" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Colonne de la première page" -#: zathura/config.c:194 -msgid "Render pages from right to left" -msgstr "" - #: zathura/config.c:196 +msgid "Render pages from right to left" +msgstr "Générer les pages de droite à gauche" + +#: zathura/config.c:198 msgid "Scroll step" msgstr "Incrément de défilement" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Incrément de défilement horizontal" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Recouvrement lors du défilement par page entière" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Zoom minimum" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Zoom maximum" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Nombre maximum de pages à garder en cache" -#: zathura/config.c:208 -msgid "Maximum size in pixels of thumbnails to keep in the cache" -msgstr "" - #: zathura/config.c:210 +msgid "Maximum size in pixels of thumbnails to keep in the cache" +msgstr "Taille maximale en pixels des miniatures à conserver en cache" + +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Nombre de positions à mémoriser dans la liste de sauts" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Recoloration (couleur sombre)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Recoloration (couleur claire)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Couleur de surbrillance" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Couleur de surbrillance (active)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "Couleur d'arrière-plan de 'Chargement...'" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "Couleur de 'Chargement...'" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" -msgstr "" +msgstr "Couleur de premier plan du mode index" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" -msgstr "" - -#: zathura/config.c:225 -msgid "Index mode foreground color (active element)" -msgstr "" - -#: zathura/config.c:226 -msgid "Index mode background color (active element)" -msgstr "" +msgstr "Couleur d'arrière plan du mode index" #: zathura/config.c:229 +msgid "Index mode foreground color (active element)" +msgstr "Couleur de premier plan du mode index (élément actif)" + +#: zathura/config.c:230 +msgid "Index mode background color (active element)" +msgstr "Couleur d'arrière plan du mode index (élément actif)" + +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Recoloriser les pages" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" "Lors de la recoloration garder la teinte d'origine et ajuster seulement la " "luminosité" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" -msgstr "" +msgstr "Lors de la recoloration, garder les couleurs de l'image originale" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Défiler en boucle" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Défilement tenant compte des limites de page" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Augmenter le nombre de pages par rangée" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Zoom centré horizontalement" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" -msgstr "" +msgstr "Centrer verticalement les pages" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Aligner la cible du lien à gauche" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Autoriser la modification du zoom quand on suit un lien" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Centrer le résultat horizontalement" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Transparence de la surbrillance" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Afficher 'Chargement...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Ajuster à l'ouverture du fichier" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Montrer les fichiers et dossiers cachés" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Montrer les dossiers" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" -msgstr "" +msgstr "Afficher les fichiers récents" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Toujours ouvrir à la première page" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Surligner les résultats de la recherche" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Activer la recherche incrémentale" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Effacer les résultats de recherche en cas d'annulation" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Utiliser le nom de base du fichier dans le titre de la fenêtre" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" +"Utiliser ~ au lieu de $HOME dans le nom du fichier dans le titre de la " +"fenêtre" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Afficher le numéro de page dans le titre de la fenêtre" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" -msgstr "" +msgstr "Utiliser la première page d'un document comme icône pour la fenêtre" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Utiliser le nom de base du fichier dans la barre d'état" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" +"Utiliser ~ au lieu de $HOME dans le nom du fichier dans la barre d'état" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Activer la prise en charge de synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" -msgstr "" +msgstr "Commande pour l'éditeur Synctex" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Activer le service D-Bus" -#: zathura/config.c:288 -msgid "Save history at each page change" +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:293 +msgid "Save history at each page change" +msgstr "Enregistrer l'historique à chaque changement de page" + +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "Le presse-papiers qui recevra les données sélectionnées avec la souris" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" -msgstr "" +msgstr "Activer une notification après avoir sélectionné du texte" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" -msgstr "" +msgstr "Niveau d'isolation" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" -msgstr "Ajouter un marque-page" +msgstr "Ajouter un favori" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" -msgstr "Supprimer un marque-page" +msgstr "Supprimer un favori" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" -msgstr "Lister tous les marque-pages" +msgstr "Lister tous les favoris" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Fermer le fichier actuel" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Montrer les informations sur le fichier" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Exécuter une commande" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Afficher l'aide" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Ouvrir un document" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Quitter zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Imprimer le document" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Sauver le document" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Sauver le document (et forcer l'écrasement)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Enregistrer les pièces jointes" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Définir le décalage de page" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Marquer l'emplacement actuel dans le document" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Supprimer les marques indiquées" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Ne pas surligner les résultats de la recherche en cours" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Surligner les résultats de la recherche en cours" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Afficher les informations de version" @@ -586,6 +591,8 @@ msgstr "Échec lors du lancement de xdg-open." #: zathura/links.c:247 msgid "Opening external applications in strict sandbox mode is not permitted" msgstr "" +"Lancer des applications externes n'est pas autorisé en mode d'isolation " +"stricte" #: zathura/links.c:280 #, c-format @@ -597,79 +604,93 @@ msgstr "Lien : page %d" msgid "Link: %s" msgstr "Lien : %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Lien : Invalide" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Rattacher à la fenêtre spécifiée par xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Chemin vers le dossier de configuration" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Chemin vers le dossier de données" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" -msgstr "" +msgstr "Chemin vers le dossier de cache" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Chemin vers le dossier de plugins" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Détacher en arrière-plan" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Mot de passe du document" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Numéro de page où aller" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Niveau de journalisation (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Afficher les informations de version" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Éditeur synctex (transféré à la commande synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" -msgstr "" +msgstr "Se déplacer à la position synctex donnée" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" -msgstr "" +msgstr "Mettre en surbrillance la position donnée dans le processus donné" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Démarrer dans un mode non-défaut" -#: zathura/main.c:160 -msgid "Search for the given phrase and display results" +#: zathura/main.c:165 +msgid "Bookmark to go to" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/main.c:166 +msgid "Search for the given phrase and display results" +msgstr "Rechercher la phrase donnée et afficher les résultats" + +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Chargement..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Copier l'image" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Enregistrer l'image sous" @@ -677,7 +698,7 @@ msgstr "Enregistrer l'image sous" #: zathura/print.c:110 #, c-format msgid "Printing page %d ..." -msgstr "" +msgstr "Impression de la page %d ..." #: zathura/print.c:192 #, c-format @@ -687,40 +708,58 @@ msgstr "Echec d'impression : %s" #: zathura/shortcuts.c:105 #, c-format msgid "Invalid adjust mode: %d" -msgstr "" +msgstr "Mode d'ajustement invalide: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" -msgstr "" +msgstr "Motif introuvable: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Ce document ne contient pas d'index" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Sans nom]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" "Impossible de lire le fichier depuis stdin et de le sauvegarder dans un " "fichier temporaire." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" +"Impossible de lire le fichier depuis GIO et de le copier dans un fichier " +"temporaire." -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" -msgstr "" +msgstr "Saisissez le mot de passe:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" "Type de fichier non supporté. Veuillez installer l'extension nécessaire." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Ce document ne contient aucune page" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Échec lors de l'enregistrement du document." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Document enregistré." + +#~ msgid "org.pwmt.zathura" +#~ msgstr "org.pwmt.zathura" diff --git a/po/he.po b/po/he.po index a9a21d2..01b57fd 100644 --- a/po/he.po +++ b/po/he.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Hebrew (http://www.transifex.com/pwmt/zathura/language/he/)\n" "Language: he\n" @@ -51,11 +51,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -67,35 +62,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "" -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "" @@ -194,53 +189,45 @@ msgstr "" msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "" - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "" - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "" -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "" -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "" -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "" -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "" -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "" -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "" @@ -259,317 +246,325 @@ msgid "Images" msgstr "" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" +msgid "Color for highlighting (active)" msgstr "" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "" @@ -591,79 +586,93 @@ msgstr "" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "" -#: zathura/main.c:146 -msgid "Reparents to window specified by xid (X11)" +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" msgstr "" -#: zathura/main.c:147 -msgid "Path to the config directory" -msgstr "" - -#: zathura/main.c:148 -msgid "Path to the data directory" -msgstr "" - -#: zathura/main.c:149 -msgid "Path to the cache directory" -msgstr "" - -#: zathura/main.c:150 -msgid "Path to the directories containing plugins" +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" msgstr "" #: zathura/main.c:151 -msgid "Fork into the background" +msgid "Reparents to window specified by xid (X11)" msgstr "" #: zathura/main.c:152 -msgid "Document password" +msgid "Path to the config directory" msgstr "" #: zathura/main.c:153 -msgid "Page number to go to" +msgid "Path to the data directory" msgstr "" #: zathura/main.c:154 -msgid "Log level (debug, info, warning, error)" +msgid "Path to the cache directory" msgstr "" #: zathura/main.c:155 -msgid "Print version information" +msgid "Path to the directories containing plugins" msgstr "" #: zathura/main.c:156 -msgid "Synctex editor (forwarded to the synctex command)" +msgid "Fork into the background" msgstr "" #: zathura/main.c:157 -msgid "Move to given synctex position" +msgid "Document password" msgstr "" #: zathura/main.c:158 -msgid "Highlight given position in the given process" +msgid "Page number to go to" msgstr "" #: zathura/main.c:159 -msgid "Start in a non-default mode" +msgid "Log level (debug, info, warning, error)" msgstr "" #: zathura/main.c:160 +msgid "Print version information" +msgstr "" + +#: zathura/main.c:161 +msgid "Synctex editor (forwarded to the synctex command)" +msgstr "" + +#: zathura/main.c:162 +msgid "Move to given synctex position" +msgstr "" + +#: zathura/main.c:163 +msgid "Highlight given position in the given process" +msgstr "" + +#: zathura/main.c:164 +msgid "Start in a non-default mode" +msgstr "" + +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "" -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "" @@ -683,35 +692,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "" + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "" diff --git a/po/hr.po b/po/hr.po index 467610d..de9e7ef 100644 --- a/po/hr.po +++ b/po/hr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Croatian (http://www.transifex.com/pwmt/zathura/language/" "hr/)\n" @@ -52,11 +52,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -68,35 +63,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "" -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "" @@ -195,53 +190,45 @@ msgstr "" msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "" - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "" - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "" -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "" -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "" -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "" -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "" -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "" -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "" @@ -260,317 +247,325 @@ msgid "Images" msgstr "" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" +msgid "Color for highlighting (active)" msgstr "" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "" @@ -592,79 +587,93 @@ msgstr "" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "" -#: zathura/main.c:146 -msgid "Reparents to window specified by xid (X11)" +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" msgstr "" -#: zathura/main.c:147 -msgid "Path to the config directory" -msgstr "" - -#: zathura/main.c:148 -msgid "Path to the data directory" -msgstr "" - -#: zathura/main.c:149 -msgid "Path to the cache directory" -msgstr "" - -#: zathura/main.c:150 -msgid "Path to the directories containing plugins" +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" msgstr "" #: zathura/main.c:151 -msgid "Fork into the background" +msgid "Reparents to window specified by xid (X11)" msgstr "" #: zathura/main.c:152 -msgid "Document password" +msgid "Path to the config directory" msgstr "" #: zathura/main.c:153 -msgid "Page number to go to" +msgid "Path to the data directory" msgstr "" #: zathura/main.c:154 -msgid "Log level (debug, info, warning, error)" +msgid "Path to the cache directory" msgstr "" #: zathura/main.c:155 -msgid "Print version information" +msgid "Path to the directories containing plugins" msgstr "" #: zathura/main.c:156 -msgid "Synctex editor (forwarded to the synctex command)" +msgid "Fork into the background" msgstr "" #: zathura/main.c:157 -msgid "Move to given synctex position" +msgid "Document password" msgstr "" #: zathura/main.c:158 -msgid "Highlight given position in the given process" +msgid "Page number to go to" msgstr "" #: zathura/main.c:159 -msgid "Start in a non-default mode" +msgid "Log level (debug, info, warning, error)" msgstr "" #: zathura/main.c:160 +msgid "Print version information" +msgstr "" + +#: zathura/main.c:161 +msgid "Synctex editor (forwarded to the synctex command)" +msgstr "" + +#: zathura/main.c:162 +msgid "Move to given synctex position" +msgstr "" + +#: zathura/main.c:163 +msgid "Highlight given position in the given process" +msgstr "" + +#: zathura/main.c:164 +msgid "Start in a non-default mode" +msgstr "" + +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "" -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "" @@ -684,35 +693,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "" + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "" diff --git a/po/id_ID.po b/po/id_ID.po index aed46a5..e941ae7 100644 --- a/po/id_ID.po +++ b/po/id_ID.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Indonesian (Indonesia) (http://www.transifex.com/pwmt/zathura/" "language/id_ID/)\n" @@ -53,11 +53,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -69,35 +64,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "'%s' tidak boleh 0. Diatur ke 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Masukan '%s' tidak valid" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Index '%s' tidak valid" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Tidak ada dokumen yang terbuka." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "jumlah argumen yang diberikan tidak valid" @@ -196,53 +191,45 @@ msgstr "Tidak ada argumen yang diberikan" msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Dokumen telah disimpan" - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Gagal menyimpan dokumen" - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Jumlah argumen tidak valid" -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Tidak dapat menulis lampiran '%s' ke '%s'" -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Tidak dapat menyimpan lampiran '%s' ke '%s'" -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Menulis citra dari '%s' ke '%s'" -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Tidak dapat menulis citra '%s' ke %s'" -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Citra tidak diketahui '%s'" -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Lampiran atau gambar tidak diketahui '%s'" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Argumen harus berupa angka." @@ -261,318 +248,326 @@ msgid "Images" msgstr "Citra" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "backend database" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Tingkat pembesaran" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Selisih antar halaman" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Jumlah halaman tiap kolom" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Kolom pada halaman pertama" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Tingkat menggulung" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Tingkat penggulungan horisontal" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Geser laman utuh" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Pembesaran minimum" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Pembesaran maksimal" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Jumlah laman yang disimpan pada cache" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" "Ukuran maksimal gambar thumbnail dalam piksel yang disimpan di tembolok" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Jumlah posisi yang diingat pada jumplist" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Mewarnai ulang (warna gelap)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Mewarnai ulang (warna cerah)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Warna sorotan" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Warna sorotan (aktif)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "'Memuat ...; warna latar" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "'Memuat ...' warna depan" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Warna depan mode indeks" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Warna latar mode indeks" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Warna depan mode indeks (elemen aktif)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Warna latar mode indeks (elemen aktif)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Mewarnai ulang halaman" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "Ketika mewarnai ulang, jaga hue dan sesuaikan kecerahan saja" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "Warna citra tetap sama saat mewarnai ulang" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Lipat gulung" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Penggulungan sadar halaman" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Jumlah halaman per baris \"lanjutan\"" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Pembesaran horisontal tengah" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Ratakan tautan ke kiri" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Biarkan pembesaran berubah saat mengikuti pranala" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Tengah-horisontalkan hasil" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Transparansi sorotan" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Memuat Render..." -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Menyesuaikan ketika membuka file" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Perlihatkan file dan direktori tersembunyi" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Perlihatkan direktori" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Selalu buka halaman pertama" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Sorot hasil pencarian" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Fungsikan pencarian berkelanjutan" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Hapus hasil pencarian ketika batal mencari" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Gunakan nama dasar file pada judul jendela" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Tampilkan nomor laman pada jendela judul" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Gunakan nama dasar berkas pada statusbar" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Support synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Penyunting perintah Synctex" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Aktifkan layanan D-Bus" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "Data yang dipilih tetikus akan ditulis ke clipboard" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Aktifkan pemberitahuan setelah menyeleksi teks" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Tambahkan pada bookmark" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Hapus bookmark" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Perlihatkan semua bookmark" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Tutup file ini" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Informasi file" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Jalankan perintah" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Bantuan" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Buka dokumen" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Tutup zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Cetak dokumen" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Simpan dokumen" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Simpan dokumen (dan menimpa berkas)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Simpan lampiran" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Set offset halaman" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Tandai lokasi sekarang dalam dokumen" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Hapus tanda terpilih" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Jangan menyorot hasil cari sekarang" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Sorot hasil pencarian sekarang" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Tunjukan informasi versi" @@ -594,79 +589,93 @@ msgstr "Link: halaman %d" msgid "Link: %s" msgstr "Link: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Link: Tidak valid" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Mengembalikan jendela sesuai dengan xid yang ditentukan (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Path ke direktori konfigurasi" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Path ke direktori data" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Path ke direktori tembolok" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Path ke direktori plugin" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Jalankan pada latar" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Kata sandi dokumen" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Nomor halaman tujuan" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Tingkat log (debug, info, peringatan, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Cetak informasi versi" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Synctex editor (diteruskan ke perintah synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Pindahkan ke posisi synctex yang diberikan" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Sorot posisi pada proses yang diberikan" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Mulai pada mode non-bawaan" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Memuat....." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Salin gambar" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Simpan gambar sebagai" @@ -686,36 +695,49 @@ msgstr "Gagal mencetak: %s" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Dokumen ini tidak mempunyai indeks" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Tidak berjudul]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" "Tidak dapat membaca berkas dari stdin dan menulisnya ke berkas sementar" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Tipe berkas tidak didukung. Silakan memasang plugin yang dibutuhkan." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Dokumen tidak mempunyai laman apapun" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Gagal menyimpan dokumen" + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Dokumen telah disimpan" diff --git a/po/it.po b/po/it.po index 3718962..fcf0057 100644 --- a/po/it.po +++ b/po/it.po @@ -11,8 +11,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-12-12 11:32+0000\n" "Last-Translator: Simone Dotto \n" "Language-Team: Italian (http://www.transifex.com/pwmt/zathura/language/it/)\n" "Language: it\n" @@ -47,6 +47,8 @@ msgid "" "Zathura can be extended to support multiple document formats using plugins. " "Other features include:" msgstr "" +"Zathura può usare le estensioni per allargare il supporto a vari formati di " +"file. Tra le altre funzionalità ci sono:" #: data/org.pwmt.zathura.appdata.xml.in:22 msgid "SyncTeX forward and backward synchronization support." @@ -60,11 +62,6 @@ msgstr "Quickmark e bookmark." msgid "Automatic document reloading." msgstr "Ricarica automatica del documento." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "org.pwmt.zathura" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -76,35 +73,35 @@ msgstr "PDF;PS;PostScript;DjVU;documenti;presentazioni;lettore;" msgid "'%s' must not be 0. Set to 1." msgstr "'%s' non può essere 0. Imposta ad 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Input inserito '%s' non valido." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Indice inserito '%s' non valido." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "Copiato il testo selezionato alla selezione %s: %s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "Copiata l'immagine selezionata alla selezione %s" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Nessun documento aperto." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Numero di argomenti errato." @@ -181,7 +178,7 @@ msgstr "Data di modifica" #: zathura/commands.c:183 msgid "Format" -msgstr "" +msgstr "Formato" #: zathura/commands.c:184 msgid "Other" @@ -203,53 +200,45 @@ msgstr "Nessun argomento specificato." msgid "Printing is not permitted in strict sandbox mode" msgstr "La stampa non è consentita in modalità sandbox restrittiva" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Documento salvato." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Impossibile salvare il documento." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Numero di argomenti non valido." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Impossibile salvare l' allegato '%s' in '%s'" -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Allegato '%s' salvato in '%s'" -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Immagine '%s' salvata come '%s'" -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Impossibile salvare l' immagine '%s' come '%s'" -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Immagine sconosciuta '%s'" -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Immagine o allegato sconosciuti '%s" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "L'esecuzione non è consentita in modalità sandbox restrittiva" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "L' argomento dev' essere un numero." @@ -268,319 +257,327 @@ msgid "Images" msgstr "Immagini" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Backend del database" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "Backend di controllo file" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Passo di zoom" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Spaziatura tra le pagine" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Numero di pagine per riga" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Colonna della prima pagina" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "Renderizza pagine da destra a sinistra" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Passo di scorrimento" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Passo di scorrimento orizzontale" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Sovrapposizione di scorrimento pagina intera" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Zoom minimo" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Zoom massimo" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Numero massimo di pagine da mantenere nella cache" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "Dimensione massima in pixel delle miniature da tenere in cache" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Numero di posizioni da mantenere nella jumplist" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Ricolorazione (colore scuro)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Ricolorazione (colore chiaro)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Colore per evidenziare" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Colore per evidenziare (attivo)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "'Caricamento ...' colore di sfondo " -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "'Caricamento ...' colore primo piano" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Modalità indice colore primo piano" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Modalità indice colore di sfondo" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Modalità indice colore primo piano (elemento attivo)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Modalità indice colore sfondo (elemento attivo)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Ricolora le pagine" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" "Quando si ricolora mantenere la tonalità originale e regolare solo la " "luminosità" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "Quando si ricolora mantieni colori dell'immagine originale" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Scrolling continuo" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Scorrimento pagina per pagina" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Avanza di un numero di pagine per riga" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Zoom centrato orizzontalmente" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "Zoom centrato verticalmente" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Allinea link target a sinistra" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Cambia lo zoom quando segui i link" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Centra orizzontalmente i risultati" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Trasparenza per evidenziare" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Renderizza 'Caricamento ...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Adatta a mentre apri il file" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Mostra file e cartelle nascosti" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Mostra cartelle" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "Mostra file recenti" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Apri sempre alla prima pagina" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Evidenzia i risultati della ricerca" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Abilita la ricerca incrementale" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Elimina risultati di ricerca alla chiusura" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Usa estensione del file nel titolo della finestra" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "Usa ~ al posto di $HOME nel nome del file nel titolo della finestra" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Mostra il numero di pagina nel titolo della finestra" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "Usa la prima pagina del documento come icona della finestra" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Usa estensione del file nella barra di stato" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "Usa ~ al posto di $HOME nel nome del file nella barra di stato" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Abilita il supporto per synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Comando dell'editor synctex" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Abilita il servizio D-Bus" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "Salva cronologia ad ogni cambiamento di pagina" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "Gli appunti in cui verranno scritti i dati selezionati dal mouse" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Attiva la notifica dopo aver selezionato del testo" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "Livello di sandbox" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Aggiungi un segnalibro" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Elimina un segnalibro" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Mostra i segnalibri" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Chiudi il file corrente" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Mostra le informazioni sul file" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Esegui un comando" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Mostra l' aiuto" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Apri un documento" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Chiudi zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Stampa il documento" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Salva il documento" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Salva il documento (e sovrascrivi)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Salva allegati" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Imposta l' offset della pagina" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Segna la posizione attuale all'interno del documento" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Elimina i segni specificati" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Non evidenziare i risultati della ricerca in corso" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Evidenzia i risultati della ricerca in corso" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Mostra informazioni sulla versione" @@ -604,79 +601,93 @@ msgstr "Link: pagina %d" msgid "Link: %s" msgstr "Link: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Link: non valido" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Sposta nellla finestra specificata da xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Percorso della directory della configurazione" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Percorso della directory dei dati" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Percorso della cartella di cache" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Percorso della directory contenente i plugin" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Crea un processo separato" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Password del documento" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Numero di pagina da andare" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Livello di log (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Mostra le informazioni sul file" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Editor synctex (inoltrato al comando synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Sposta alla posizione synctex specificata" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Evidenzia data posizione nel processo dato" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Avvia in una modalità non standard" -#: zathura/main.c:160 -msgid "Search for the given phrase and display results" +#: zathura/main.c:165 +msgid "Bookmark to go to" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/main.c:166 +msgid "Search for the given phrase and display results" +msgstr "Ricerca la chiave data e mostra i risultati" + +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Caricamento..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Copia immagine" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Salva immagine come" @@ -696,37 +707,53 @@ msgstr "Impossibile stampare: %s" msgid "Invalid adjust mode: %d" msgstr "Modalità di regolazione non valida: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "Pattern non trovato: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Questo documento non contiene l' indice" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Nessun nome]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" "Impossibile leggere il file dall' stdin e scriverlo in un file temporaneo." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "Impossibile leggere file da GIO e copiarlo su un file temporaneo" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "Inserisci password" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" "Tipo di file non supportato. Per favore, installa il plugin necessario." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Il documento non contiene alcuna pagina" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Impossibile salvare il documento." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Documento salvato." + +#~ msgid "org.pwmt.zathura" +#~ msgstr "org.pwmt.zathura" diff --git a/po/lt.po b/po/lt.po index 01777e1..469f94d 100644 --- a/po/lt.po +++ b/po/lt.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Lithuanian (http://www.transifex.com/pwmt/zathura/language/" "lt/)\n" @@ -54,11 +54,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -70,35 +65,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Netinkama įvestis: „%s“." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Duotas netinkamas indeksas: „%s“." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Nėra atidarytų dokumentų." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Duotų parametrų skaičius yra neteisingas." @@ -197,53 +192,45 @@ msgstr "Parametrai neduoti." msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Dokumentas išsaugotas." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Dokumento išsaugoti nepavyko." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Neteisingas parametrų skaičius." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Priedas „%s“ negalėjo būti įrašytas į „%s“." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Priedas „%s“ įrašytas į „%s“." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Atvaizdas „%s“ įrašytas į „%s“." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Atvaizdas „%s“ negalėjo būti įrašytas į „%s“," -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Nežinomas atvaizdas „%s“." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Nežinomas priedas ar atvaizdas „%s“." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Parametras turi būti skaičius." @@ -262,317 +249,325 @@ msgid "Images" msgstr "Atvaizdai" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Duomenų bazės posistemė" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Priartinimo žingsnis" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Užpildymas tarp puslapių" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Puslapių skaičius eilutėje" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Pirmo puslapio stulpelis" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Slinkties žingsnis" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Horizontalios slinksties žingsnis" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Mažiausias priartinimas" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Didžiausias priartinimas" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Puslapių limitas spartinančioje atmintinėje" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Spalvų keitimas (tamsi spalva)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Spalvų keitimas (šviesi spalva)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Žymos spalva" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Žymos spalva (aktyvi)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "„Kraunama ...“ fono spalva" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "„Kraunama ...“ pagrindinė spalva" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Pakeisti spalvas" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Puslapių ribas atpažįstanti slinktis" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Padidinti puslapių skaičių eilutėje" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Žymų skaidrumas" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Atvaizduoti „Kraunama ...“" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Prisitaikyti atidarant bylą" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Rodyti paslėptus failus ir katalogus" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Rodyti katalogų sąrašą" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Visada atverti pirmą puslapį" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Pažymėti paieškos rezultatus" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Įjungti prieauginę paiešką" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Išvalyti paieškos rezultatus nutraukiant" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Rodyti puslapio skaičių lango pavadinime" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Naudoti bylos vardą būsenos juostoje" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Įjungti synctex palaikymą" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Pridėti žymę" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Ištrinti žymę" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Žymių sąrašas" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Uždaryti dabartinę bylą" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Rodyti bylos informaciją" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Rodyti pagalbą" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Atidryti dokumentą" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Uždaryti zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Atspausdinti dokumentą" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Išsaugoti dokumentą" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Išsaugoti dokumentą (ir priverstinai perašyti)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Išsaugoti priedus" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Nustatyti puslapio poslinkį" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Pažymėti dabartinę dokumento vietą" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Ištrinti šias žymes" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Nežymėti dabartinės paieškos rezultatų" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Pažymėti dabartinės paieškos rezultatus" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Rodyti versijos informaciją" @@ -594,79 +589,93 @@ msgstr "Nuoroda: %d puslapis" msgid "Link: %s" msgstr "Nuoroda: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Neteisinga nuoroda" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Konfigūracinių failų aplanko adresas" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Duomenų aplanko adresas" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Įskiepių aplanko adresas" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Dokumento slaptažodis" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Pereiti į puslapį" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Registravimo lygis (derinimas, informacija, įspėjimai, klaidos)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Spausdinti versijos informaciją" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Synctex redaktorius (naudojama synctex komandoje)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Kraunama..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Kopijuoti atvaizdą" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Irašyti atvaizdą kaip" @@ -686,35 +695,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Šit dokumentas neturi turinio" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Bevardis]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Bylos tipas nepalaikomas. Įdiekite tam skirtus įskiepius." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Dokumente puslapių nėra" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Dokumento išsaugoti nepavyko." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Dokumentas išsaugotas." diff --git a/po/nl.po b/po/nl.po index bc5dc8d..d3cd6d8 100644 --- a/po/nl.po +++ b/po/nl.po @@ -2,14 +2,14 @@ # SPDX-License-Identifier: Zlib # # Translators: -# Heimen Stoffels , 2017-2020 +# Heimen Stoffels , 2017-2020 msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-09-03 21:33+0200\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" "PO-Revision-Date: 2020-07-27 15:17+0000\n" -"Last-Translator: Heimen Stoffels \n" +"Last-Translator: Heimen Stoffels \n" "Language-Team: Dutch (http://www.transifex.com/pwmt/zathura/language/nl/)\n" "Language: nl\n" "MIME-Version: 1.0\n" @@ -57,11 +57,6 @@ msgstr "Verwijzingen en bladwijzers." msgid "Automatic document reloading." msgstr "Automatisch documenten herladen." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "org.pwmt.zathura" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -73,35 +68,35 @@ msgstr "PDF;PS;PostScript;DjVU;document;presentatie;weergave;" msgid "'%s' must not be 0. Set to 1." msgstr "'%s' mag niet op 0 worden ingesteld. Stel in op 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Ongeldige invoer '%s' opgegeven." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Ongeldige index '%s' opgegeven." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "De tekst is gekopieerd naar de selectie %s: %s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "De afbeelding is gekopieerd naar de selectie %s" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Geen document geopend." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Ongeldig aantal argumenten opgegeven." @@ -200,53 +195,45 @@ msgstr "Geen argumenten opgegeven." msgid "Printing is not permitted in strict sandbox mode" msgstr "Afdrukken is niet toegestaan in de strenge sandboxmodus" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Het document is opgeslagen." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Het document kan niet worden opgeslagen." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Ongeldig aantal argumenten." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "De bijlage '%s' kan niet worden weggeschreven naar '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "De bijlage '%s' is weggeschreven naar '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "De afbeelding '%s' is weggeschreven naar '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "De afbeelding '%s' kan niet worden weggeschreven naar '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Onbekende afbeelding: '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Onbekende bijlage of afbeelding: '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "Uitvoeren is niet toegestaan in de strenge sandboxmodus" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Het argument moet een getal zijn." @@ -265,322 +252,330 @@ msgid "Images" msgstr "Afbeeldingen" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Databankback-end" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "Bestandsmonitorback-end" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Zoomschaal" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Opvulling tussen pagina's" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Aantal pagina's per rij" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Kolom van de eerste pagina" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "Pagina's van rechts naar links tonen" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Scrollsnelheid" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Horizontale scrollsnelheid" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Scrolloverlapping op volledige pagina" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Minimaal zoomniveau" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Maximaal zoomniveau" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Het maximumaantal pagina's dat moet worden bewaard in de cache" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" "Het maximumaantal miniaturen dat moet worden bewaard in de cache (in pixels)" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Het aantal posities dat moet worden onthouden in de jumplist" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Herinkleuren (donkere kleur)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Herinkleuren (lichte kleur)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Markeerkleur" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Markeerkleur (actief)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "'Bezig met laden ...'-achtergrondkleur" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "'Bezig met laden ...'-voorgrondkleur" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Indexmodus-voorgrondkleur" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Indexmodus-achtergrondkleur" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Indexmodus-voorgrondkleur (actief element)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Indexmodus-achtergrondkleur (actief element)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Pagina's herinkleuren" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" "Behoudt tijdens het herinkleuren de oorspronkelijke tint en pas alleen de " "belichting aan" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "Behoudt tijdens het herkleuren de originele afbeeldingskleuren" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Scrollen omslaan" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Paginabewust scrollen" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Aantal vooruit-pagina's per rij" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Horizontaal-gecentreerde zoom" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "Pagina's verticaal centreren" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Linkdoel uitlijnen naar links" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Zoom aanpassen bij volgen van links" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Resultaat horizontaal centreren" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Markeerdoorzichtigheid" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "'Bezig met laden...' tonen" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Aanpassen aan bij openen van bestand" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Verborgen bestanden en mappen tonen" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Mappen tonen" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "Onlangs geopende bestanden tonen" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Altijd de eerste pagina openen" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Zoekresultaten markeren" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Stapsgewijs zoeken inschakelen" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Zoekresultaten wissen na afbreken" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Basisnaam van bestand gebruiken in de venstertitel" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "~ gebruiken i.p.v. $HOME in de bestandsnaam in de venstertitel" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Paginanummer tonen in de venstertitel" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "Eerste documentpagina gebruiken als vensterpictogram" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Basisnaam van bestand gebruiken in de statusbalk" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "~ gebruiken i.p.v. $HOME in de bestandsnaam in de statusbalk" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Synctex-ondersteuning inschakelen" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Synctex-bewerkeropdracht" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "D-Bus-dienst inschakelen" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "Geschiedenis opslaan na elke pagina-omslag" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" "Het klembord waarnaar met de muis geselecteerde gegevens moeten worden " "weggeschreven" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Melding tonen na selecteren van tekst" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "Sandboxniveau" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Bladwijzer toevoegen" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Bladwijzer verwijderen" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Alle bladwijzers tonen" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Huidig bestand sluiten" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Bestandsinformatie tonen" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Opdracht uitvoeren" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Hulp tonen" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Document openen" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Zathura sluiten" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Document afdrukken" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Document opslaan" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Document opslaan (en overschrijven afdwingen)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Bijlagen opslaan" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Pagina-afwijking instellen" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Huidige locatie in document markeren" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Opgegeven markeringen verwijderen" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Huidige zoekresultaten niet markeren" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Huidige zoekresultaten markeren" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Versie-informatie tonen" @@ -604,79 +599,93 @@ msgstr "Link: pagina %d" msgid "Link: %s" msgstr "Link: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Link: ongeldig" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Wordt bij bovenliggend, door xid (X11) opgegeven venster gevoegd" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Pad naar de configuratiemap" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Pad naar de gegevensmap" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Pad naar de cachemap" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Pad naar de plug-inmappen" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Naar achtergrond verplaatsen" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Documentwachtwoord" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Ga naar paginanummer" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Logniveau (foutopsporing, informatie, waarschuwing, fout)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Versie-informatie tonen" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Synctex-bewerker (wordt doorgestuurd naar de synctex-opdracht)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Verplaatsen naar opgegeven synctex-positie" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Opgegeven positie markeren in het opgegeven proces" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Starten in een niet-standaardmodus" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "Zoeken naar zoekterm en resultaten tonen" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Bezig met laden..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Afbeelding kopiëren" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Afbeelding opslaan als" @@ -696,39 +705,55 @@ msgstr "Het afdrukken is mislukt: %s" msgid "Invalid adjust mode: %d" msgstr "Ongeldige aanpassingsmodus: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "Het patroon is niet gevonden: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Dit document bevat geen index" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Naamloos]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" "Het bestand kan niet worden gelezen uit stdin en weggeschreven naar een " "tijdelijk bestand." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" "Het bestand kan niet worden gelezen uit GIO en gekopieerd naar een tijdelijk " "bestand." -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "Wachtwoord invoeren:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Niet-ondersteund bestandstype. Installeer de benodigde plug-in." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Het document bevat geen pagina's" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Het document kan niet worden opgeslagen." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Het document is opgeslagen." + +#~ msgid "org.pwmt.zathura" +#~ msgstr "org.pwmt.zathura" diff --git a/po/no.po b/po/no.po index eed7fda..e186d10 100644 --- a/po/no.po +++ b/po/no.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Norwegian (http://www.transifex.com/pwmt/zathura/language/" "no/)\n" @@ -52,11 +52,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -68,35 +63,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Ugyldig inndata '%s' gitt." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Ugyldig index '%s' gitt." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Ingen dokumenter åpnet." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Ugyldig nummer av argumenter gitt." @@ -195,53 +190,45 @@ msgstr "Ingen argumenter gitt." msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Dokumentet er lagret." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Kunne ikke lagre dokumentet." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Ugyldig nummer av argumenter." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Kunne ikke skrive vedlegg '%s' til '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Skrev vedlegg '%s' til '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Skrev bilde '%s' til '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Kunne ikke skrive bilde '%s' til '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Ukjent bilde '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Ukjent vedlegg eller bilde '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Argumentet må være et tall." @@ -260,317 +247,325 @@ msgid "Images" msgstr "Bilder" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Database backend" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Zoom nivå" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Avstand mellom sider" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Nummer av sider per rad" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Skrolle nivå" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Zoom minimum" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Zoom maximum" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Maksimum antall sider å holde i mellomlagringen" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Antall posisjoner å huske i hopp-til-listen" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Om-farger (mørk farge)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Om-farge (lys farge)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Farge for utheving" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Farge for utheving (aktiv)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "'Laster ...' bakgrunnsfarge" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "'Laster ...' forgrunnsfarge" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Om-farge sider" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Horisontalsentrert zoom" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "La zoom bli endret når følgende linker" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Sentrer resultatene horisontalt" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Klarhet for utheving" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Render 'Laster ...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Juster til når du åpner filen" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Vis skjulte filer og mapper" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Vis mapper" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Alltid åpne på første side" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Uthev søkeresultater" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Stryk ut søkeresulteter ved avbrytelse" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Vis nummer av sider i vinduestittelen" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Aktiv D-Bus servicen" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Legg til bokmerke" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Slett bokmerke" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "List alle bokmerker" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Lukk den gjeldende filen" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Vis filinformasjon" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Kjør en kommando" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Vis hjelp" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Åpne dokument" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Lukk zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Skriv ut dokument" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Lagre dokument" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Lagre dokument (og tving til å skrive over)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Lagre vedlegg" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Marker nåværende lokalasjon i dokumentet" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Slett spesifiserte merker" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Ikke uthev gjeldende søkeresultater" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Uthev følgende søkeresultater" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Vis versjonsinformasjon" @@ -592,79 +587,93 @@ msgstr "Link: side %d" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Link: Ugyldig" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Sti til konfigureringsmappe" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Sti til data-mappe" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Sti til mapper som inneholder plugins" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Dokument passord" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Sidetall å gå til" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Logg nivå (diagnostisering, info, advarsler, feil)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Skriv ut versjonsinformasjon" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Start i ikke-standard modus" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Laster..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Kopier bilde" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Lagre bilde som" @@ -684,35 +693,48 @@ msgstr "Utskrift feilet: %s" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Dette dokumenetet inneholder ikke noen index" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Inget navn]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "Kunne ikke lese fil fra stdin og skrive til temporærfil." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Usupportert filtype. Vennligst innstaller den nødvendige pluginen." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Dokumentet inneholder ingen sider" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Kunne ikke lagre dokumentet." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Dokumentet er lagret." diff --git a/po/pl.po b/po/pl.po index 8c81fda..4ee07dc 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Polish (http://www.transifex.com/pwmt/zathura/language/pl/)\n" "Language: pl\n" @@ -54,11 +54,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -70,35 +65,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Nieprawidłowy argument: %s" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Nieprawidłowy indeks: %s" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Nie otwarto żadnego pliku" -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Nieprawidłowa liczba parametrów polecenia" @@ -197,53 +192,45 @@ msgstr "Nie podano parametrów polecenia" msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Zapisano dokument" - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Błąd zapisu" - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Niewłaściwa liczba parametrów polecenia" -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Nie można dodać załącznika %s do pliku %s" -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Zapisano załącznik %s do pliku %s" -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Obrazek %s zapisano do pliku %s" -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Nie można dodać obrazka %s do pliku %s" -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Nieznany obrazek '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Nieznany załącznik lub obrazek '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Parametr polecenia musi być liczbą" @@ -262,317 +249,325 @@ msgid "Images" msgstr "Obrazki" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Baza danych" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Skok powiększenia" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Odstęp pomiędzy stronami" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Liczba stron w wierszu" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Skok przewijania" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Skok przewijania poziomego" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Minimalne powiększenie" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Maksymalne powiększenie" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Maksymalna liczba stron w pamięci podręcznej" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Ciemny kolor negatywu" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Jasny kolor negatywu" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Kolor wyróżnienia" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Kolor wyróżnienia bieżącego elementu" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "Kolor tła komunikatu „Wczytywanie pliku...”" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "Kolor komunikatu „Wczytywanie pliku...”" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Negatyw" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "Dla negatywu zachowaj oryginalny odcień i zmień tylko jasność" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Zawijanie dokumentu" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Zwiększ liczbę stron w wierszu" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Powiększenie względem środka" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Poziome wyśrodkowanie wyniku" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Przezroczystość wyróżnienia" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Wyświetlaj: „Wczytywanie pliku...”" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Dopasowanie widoku pliku" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Wyświetl ukryte pliki i katalogi" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Wyświetl katalogi" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Zawsze otwieraj na pierwszej stronie" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Podświetl wyniki wyszukiwania" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Włącz wyszukiwanie przyrostowe" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Wyczyść wyniki wyszukiwania po przerwaniu" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Pokaż nazwę pliku w pasku tytułu" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Wyświetl numer strony w pasku tytułu" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Nazwa pliku w pasku stanu" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Włącz synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Uruchom serwis D-Bus" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Dodaj zakładkę" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Usuń zakładkę" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Wyświetl zakładki" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Zamknij plik" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Wyświetl informacje o pliku" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Wykonaj polecenie" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Wyświetl pomoc" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Otwórz plik" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Zakończ" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Wydrukuj" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Zapisz" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Zapisz (nadpisując istniejący plik)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Zapisz załączniki" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Ustaw przesunięcie numerów stron" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Zaznacz aktualną pozycję w dokumencie" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Skasuj określone zakładki" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Nie podświetlaj aktualnych wyników wyszukiwania " -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Podświetl aktualne wyniki wyszukiwania" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Wyświetl informacje o wersji" @@ -594,79 +589,93 @@ msgstr "Link: strona %d" msgid "Link: %s" msgstr "Link: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Nieprawidłowy link" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Przypisz proces do rodzica o danym xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Położenie katalogu konfiguracyjnego" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Położenie katalogu danych" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Położenie katalogu wtyczek" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Forkuj w tle" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Hasło dokumentu" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Szczegółowość komunikatów (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Wyświetl informacje o wersji" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Edytor synctex (przekierowanie do komendy synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Wczytywanie pliku..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Skopiuj obrazek" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Zapisz obrazek jako" @@ -686,35 +695,48 @@ msgstr "Nie można wydrukować: %s" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Dokument nie zawiera indeksu" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[bez nazwy]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Niewspierany rodzaj pliku. Zainstaluj wymagane wtyczki" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Dokument nie zawiera żadnej strony" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Błąd zapisu" + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Zapisano dokument" diff --git a/po/pt_BR.po b/po/pt_BR.po index 91a8205..03aecbc 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-04-27 01:40+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Fernando Henrique \n" "Language-Team: Portuguese (Brazil) (http://www.transifex.com/pwmt/zathura/" "language/pt_BR/)\n" @@ -59,11 +59,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -75,35 +70,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "'%s' não deve ser 0. Defina para 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Dados de entrada inválida '%s' ." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Dados de índice invalido '%s'." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Nenhum documento aberto." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Número de argumentos dados inválidos." @@ -202,53 +197,45 @@ msgstr "Nenhum argumento dado." msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Documento salvo." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Falha ao salvar o documento." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Número de argumento invalido." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Não foi possível gravar anexo '%s' para '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Escreveu anexo '%s' para '%s'." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Escreveu imagem '%s' para '%s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Não foi possível gravar imagem '%s' para '%s'." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Imagem desconhecida '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Anexo desconhecido ou imagem '%s'." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "O argumento deve ser um número." @@ -267,320 +254,328 @@ msgid "Images" msgstr "Imagens" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Fim da base de dados" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Grau de Zoom" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Preenchimento entre páginas" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Número de paginas por linha" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Coluna da primeira página" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Fase de Rolagem" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Etapa de rolagem horizontal" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Sobreposição de rolagem de página inteira" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Zoom minimo" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Zoom máximo" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Número máximo de páginas para manter no cache" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "Tamanho máximo em pixels de miniaturas para manter no cache" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Numero de posições para lembrar na lista de salto" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Recolorindo (cor escura)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Recolorindo (cor clara)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Cor para destacar" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Cor para destacar (ativo)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "'Carregando ...' cor de fundo" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "'Carregando ...' cor de primeiro plano" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Cor modo de índice no primeiro plano" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Cor modo de índice, fundo" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Cor modo de índice no primeiro plano (elemento ativo)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Cor modo de índice, fundo (elemento ativo)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Recolorir páginas" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" "Quando recolorir, manter tonalidade original e ajustar somente a luminosidade" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "Quando recolorir, manter cores de imagens originais" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Rolagem envoltório" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Rolagem de página consciente" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Numero de avanço de paginas por linha" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Zoom centrado horizontalmente" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Alinhe destino do link à esquerda" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Zoom será mudado quando seguir os links" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Resultado centrado horizontalmente" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Transparência para destacar" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Renderizando 'Carregando...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Ajuste para quando abrir o arquivo" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Mostrar arquivos ocultos e diretórios" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Mostrar diretórios" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Sempre abrir na primeira página" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Destaque resultados de busca" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Ativar pesquisa incremental" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Limpar resultados de busca ou abortar" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Usar nome do arquivo na barra de titulo" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Exibir o número da página no título da janela." -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Use o nome do arquivo na barra de status" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Ativar suporte synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Comando editor Synctex" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Habilitar serviço D-Bus" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" "A área de transferência em que o dados selecionados com o mouse vão ser " "escritos" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Habilitar notificação após a seleção de texto" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Adicionar um favorito" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Deletar um favorito" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Listar todos favoritos" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Fechar arquivo atual" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Mostrar informações do arquivo" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Executar um comando" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Mostrar ajuda" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Abrir documento" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Fechar zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Imprimir documento" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Salvar documento" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Salvar documento (e forçar sobrescrever)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Salvar anexos" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Definir deslocamento da página" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Marcar localização atual no documento" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Apagar as marcas especificadas" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Não destacar resultados de busca atual" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Destacar resultado de busca atual" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Mostrar informações sobre a versão" @@ -602,79 +597,93 @@ msgstr "Link: página %d" msgid "Link: %s" msgstr "Link: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Link: Inválido" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Reparar a janela especificada por xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Caminho de diretório para configuração" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Caminho para diretório de dados" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Caminho para o diretório de cache" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Caminho de diretório que contenham plugins" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Deslocar no fundo" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Senha do documento" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Número da página para ir" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Nível de log (depurar, informação, aviso, erro)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Imprimir informações sobre a versão" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Editor synctex (encaminhado para o comando synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Mover para determinada posição synctex" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Destacar determinada posição no determinado processo" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Começar em um modo não padrão" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Carregando..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Copiar imagem" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Salvar imagem para" @@ -694,38 +703,51 @@ msgstr "Impressão falhou: %s" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Este documento não contem qualquer índice" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Sem nome]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" "Não foi possível ler o arquivo a partir de stdin e gravá-lo em um arquivo " "temporário." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" "Formato de arquivo não suportado. Por favor, instale o plugin necessário." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Documento não contém quaisquer páginas" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Falha ao salvar o documento." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Documento salvo." diff --git a/po/ru.po b/po/ru.po index d1351e4..28b3d1d 100644 --- a/po/ru.po +++ b/po/ru.po @@ -12,9 +12,9 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-04-28 19:42+0000\n" -"Last-Translator: crt0r citrus\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-09-06 07:52+0000\n" +"Last-Translator: AlexanderFilev \n" "Language-Team: Russian (http://www.transifex.com/pwmt/zathura/language/ru/)\n" "Language: ru\n" "MIME-Version: 1.0\n" @@ -65,11 +65,6 @@ msgstr "Быстрые заметки и закладки." msgid "Automatic document reloading." msgstr "Автоматическая перезагрузка документов." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "org.pwmt.zathura" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -81,35 +76,35 @@ msgstr "PDF,PS,PostScript,DjVU,документ,презентация,прос msgid "'%s' must not be 0. Set to 1." msgstr "«%s» не может быть 0, установлен как 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Неправильный ввод: %s." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Получен неверный индекс: %s." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "Выделенный текст скопирован в выделение %s: %s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "Скопировано выбранное изображение в выделение %s" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Нет открытых документов." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Указано неверное число аргументов." @@ -208,53 +203,45 @@ msgstr "Отсутствуют аргументы." msgid "Printing is not permitted in strict sandbox mode" msgstr "Печать не разрешена в строгом режиме песочницы" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Документ сохранён." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Не удалось сохранить документ." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Неверное количество аргументов." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Не удалось сохранить приложенный файл «%s» в «%s»." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Файл «%s» сохранён в «%s»." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Изображение «%s» сохранено в «%s»." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Не удалось записать изображение «%s» в «%s»." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Неизвестное изображение «%s»." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Неизвестное вложение или изображение «%s»." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "Exec не разрешен в строгом режиме песочницы" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Аргумент должен быть числом." @@ -273,317 +260,325 @@ msgid "Images" msgstr "Изображения" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Бэкэнд базы данных" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "Бэкэнд файлового монитора" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Шаг увеличения" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Разрыв между страницами" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Количество страниц в ряд" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Столбец первой страницы" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "Рендеринг страниц справа налево" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Шаг прокрутки" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Шаг горизонтальной прокрутки" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Перекрытие страниц при прокрутке" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Минимальное увеличение" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Максимальное увеличение" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Максимальное количество страниц хранимых в кэше" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "Максимальный размер в пикселях для миниатюр хранимых в кэше" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Длина истории переходов" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Перекрашивание (тёмные тона)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Перекрашивание (светлые тона)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Цвет для подсветки" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Цвет для подсветки (активной)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "Цвет фона загрузочной заставки" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "Цвет загрузочной заставки" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Основной цвет в режиме указателя" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Фоновый цвет в режиме указателя" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Основной цвет в режиме указателя (активный элемент)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Фоновый цвет в режиме указателя (активный элемент)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Перекрасить страницы" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "При перекраске сохранять оттенок и изменять только осветление" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "При перекраске сохранять исходные цвета изображения" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Плавная прокрутка" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Постраничная прокрутка" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Увеличить количество страниц в ряду" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Центрировать увеличение по горизонтали" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "Вертикально по центру страницы" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Выровнять цель ссылки по левому краю" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Разрешить изменять размер при следовании по ссылкам" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Центрировать результат по горизонтали" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Прозрачность подсветки" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Рендер «Загружается ...»" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Подогнать размеры при открытии документа" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Показывать скрытые файлы и каталоги" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Показывать каталоги" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "Показывать последние файлы" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Всегда открывать на первой странице" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Подсветить результаты поиска" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Включить инкрементальный поиск" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Сбросить результаты при отмене поиска" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Использовать базовое имя файла в заголовке" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "Использовать ~ вместо $HOME в имени файла в заголовке" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Показывать номер страницы в заголовке" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "Использовать первую страницу документа в качестве значка окна" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Использовать базовое имя файла в строке состояния" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "Использовать ~ вместо $HOME в имени файла в строке состояния" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Включить поддержку synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Команда редактору от synctex" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Включить сервис D-Bus" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "Сохранить историю при каждом изменении страницы" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "Буфер для записи данных из области выделенных мышкой" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Включить уведомления после выделения текста" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "Уровень песочницы" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Добавить закладку" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Удалить закладку" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Показать все закладки" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Закрыть текущий файл" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Показать информацию о файле" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Выполнить команду" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Помощь" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Открыть документ" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Выход" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Печать" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Сохранить документ" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Сохранить документ (с перезаписью)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Сохранить прикреплённые файлы" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Сохранить смещение страницы" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Пометить текущую позицию в документе" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Удалить указанные пометки" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Не подсвечивать результаты текущего поиска" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Подсветить результаты текущего поиска" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Показать информацию о версии файла" @@ -605,79 +600,93 @@ msgstr "Ссылка: страница %d" msgid "Link: %s" msgstr "Ссылка: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Ссылка: неправильная" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Сменить материнское окно на окно, указанное в xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Путь к каталогу с настройкой" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Путь к каталогу с данными" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Путь к каталогу с кэшем" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Путь к каталогу с плагинами" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Запустить в фоне" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Пароль документа" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Перейти к странице номер" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Уровень журналирования (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Показать информацию о файле" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Редактор для synctex (передаётся далее программе synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Перейти к указанному положению synctex" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Подсветка заданного положения в заданном процессе" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Запустить в специальном режиме" -#: zathura/main.c:160 -msgid "Search for the given phrase and display results" +#: zathura/main.c:165 +msgid "Bookmark to go to" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/main.c:166 +msgid "Search for the given phrase and display results" +msgstr "Поиск данной фразы и отображение результатов" + +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Загрузка..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Скопировать изображение" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Сохранить изображение как" @@ -697,38 +706,54 @@ msgstr "Не удалось напечатать %s" msgid "Invalid adjust mode: %d" msgstr "Неверный режим настройки: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "Шаблон не найден: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "В документе нет индекса" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Без названия]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" "Не удалось прочитать файл со стандартного входа и записать его во временный " "файл." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" "Не удалось прочитать файл через GIO и скопировать его во временный файл." -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "Введите пароль:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Тип файла не поддерживается. Установите соответствующий плагин." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "В документе нет страниц" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Не удалось сохранить документ." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Документ сохранён." + +#~ msgid "org.pwmt.zathura" +#~ msgstr "org.pwmt.zathura" diff --git a/po/sv.po b/po/sv.po index ea3372c..ed04faf 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Rasmussen \n" "Language-Team: Swedish (http://www.transifex.com/pwmt/zathura/language/sv/)\n" "Language: sv\n" @@ -56,11 +56,6 @@ msgstr "Snabbmärken och bokmärken." msgid "Automatic document reloading." msgstr "Läs automatisk om dokument." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "org.pwmt.zathura" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -72,35 +67,35 @@ msgstr "PDF;PS;PostScript;DjVU;dokument;presentation;visare;" msgid "'%s' must not be 0. Set to 1." msgstr "”%s” får inte vara 0. Satt till 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Ogiltig indata ”%s” angiven." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Ogiltigt index ”%s” angivet." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "Kopiera markerad text till marking %s: %s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "Kopiera markerad bild till markering %s" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Inget dokument öppnat." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Ogiltigt antal argument angivna." @@ -199,53 +194,45 @@ msgstr "Inga argument angivna." msgid "Printing is not permitted in strict sandbox mode" msgstr "Utskrift stöds inte i strikt sandlådeläge" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Dokument sparat." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Misslyckades med att spara dokument." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Ogiltigt antal argument." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Kunde inte skriva bilaga ”%s” till ”%s”." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Skrev bilaga ”%s” till ”%s”." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Skrev bild ”%s” till ”%s”." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Kunde inte skriva bild ”%s” till ”%s”." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Okänd bild ”%s”." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Okänd bilaga eller bild ”%s”." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "Exec tillåts inte i strikt sandlådeläge" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Argument måste vara ett nummer." @@ -264,317 +251,325 @@ msgid "Images" msgstr "Bilder" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Databasbakände" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "Filövervakningsbakände" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Zoomsteg" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Utrymme mellan sidor" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Antal sidor per rad" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Kolumn för den första sidan" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "Rendera sidor från höger till vänster" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Rullningssteg" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Horisontellt rullningssteg" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Överlappning vid helsiddesrullning" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Minsta zoom" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Största zoom" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Maximalt antal sidor att hålla i cachen" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "Maximal storlek i pixla för miniatyrbilder att hålla i cachen" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Antal position att komma ihåg i hopplistan" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Omfärgning (mörk färg)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Omfärgning (ljus färg)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Färg för färgmarkering" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Färg för färgmarkering (aktiv)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "Bakgrundsfärg för ”Läser in…”" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "Förgrundsfärg för ”Läser in…”" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Förgrundsfärg för indexläge" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Bakgrundsfärg för indexläge" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Förgrundsfärg för indexläge (aktivt element)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Bakgrundsfärg för indexläge (aktivt element)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Omfärga sidor" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "Vid omfärgning behåll originalnyans och justera endast ljushet" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "Vid omfärgning behåll originalfärger för bilder" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Omslagsrullning" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Sidmedveten rullning" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Antal sidor per rad att avancera" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Horisontellt centrerad zoom" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "Centrera sidor vertikalt" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Justera länkmål till vänster" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Låt zoom ändras när länkar följs" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Centrerar resultat horisontellt" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Tansparens för färgmarkering" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Rendera ”Läser in …”" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Justera till vid öppning av fil" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Visa gömda filer och kataloger" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Visa kataloger" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "Visa senaste filer" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Öppna alltid på första sidan" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Färgmarkera sökresultat" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Aktivera inkrementell sökning" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Rensa sökresultat vid avbrott" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Använd basnman för filen i fönstertiteln" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "Använd ~ istället för $HOME i filnamnet i fönstertiteln" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Visa sidnummer i fönstertiteln" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "Använd den första sidan från ett dokument som fönsterikon" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Använd basnamnet för filen in statusraden" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "Använd ~ istället för $HOME i filnamnet i statsraden" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Aktivera synctex-stöd" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Synctex-redigerarkommando" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Aktivera D-Bus-tjänst" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "Spara historik vid varje sidbyte" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "Urklipp till vilket musmarkerad data kommer att skrivas" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Aktivera avisering efter att ha markerat text" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "Sandlådenivå" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Lägg till ett bokmärke" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Ta bort ett bokmärke" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Lista alla bokmärken" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Stäng aktuell fil" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Visa filinformation" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Exekvera ett kommando" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Visa hjälp" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Öppna dokument" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Stäng zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Skriv ut dokument" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Spara dokument" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Spara dokument (och tvinga överskrivning)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Spara bilagor" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Sätt sidposition" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Markera aktuell position inom dokumentet" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Ta bort angivna märken" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Färgmarkera inte sökresultat" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Färgmarkera aktuella sökresultat" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Visa versionsinformation" @@ -596,79 +591,93 @@ msgstr "Länk: sida %d" msgid "Link: %s" msgstr "Länk: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Länk: Ogiltig" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Ändrar förälder till förster angivet av xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Sökväg till konfigurationskatalogen" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Sökväg till datakatlogen" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Sökväg till cachekatalogen" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Sökväg till kataloger som innehåller instick" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Forka till bakgrunden" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Dokumentlösenord" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Sidnummer att gå til" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Loggningsnivå (debug, info, warning, error)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Skriv ut versionsinformation" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Synctex-redigerare (vidareskickat till synctex-kommandot)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Flytta till angiven synctex-position" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Färgmarkera angiven position i den angivna processen" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Starta i ett icke-standardläge" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Läser in…" -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Kopiera bild" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Spara bild som" @@ -688,35 +697,51 @@ msgstr "Utskrift misslyckades: %s" msgid "Invalid adjust mode: %d" msgstr "Ogiltigt justeringsläge: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "Mönster hittades inte: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Detta dokument innehåller inget index" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Namnlös]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "Kunde inte läsa fil från stdin och skriva den till en temporärfil." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "Kunde inte läsa fil från GIO och kopiera den till en temporärfil." -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "Ange lösenord:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Filtyp stöds ej. Installera det nödvändiga insticket." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Dokument innehåller inga sidor" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Misslyckades med att spara dokument." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Dokument sparat." + +#~ msgid "org.pwmt.zathura" +#~ msgstr "org.pwmt.zathura" diff --git a/po/ta_IN.po b/po/ta_IN.po index 49c864f..38364f7 100644 --- a/po/ta_IN.po +++ b/po/ta_IN.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-22 22:48+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Sebastian Ramacher \n" "Language-Team: Tamil (India) (http://www.transifex.com/pwmt/zathura/language/" "ta_IN/)\n" @@ -52,11 +52,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "" -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -68,35 +63,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "கொடுக்கப்பட்ட உள்ளீடு(input) '%s' தவறு" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "கொடுக்கப்பட்ட index '%s' தவறு" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "எந்தக் ஆவணமும் திறக்கப்படவில்லை" -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "கொடுக்கப்பட்ட arguments-களின் எண்ணிக்கை தவறு" @@ -195,53 +190,45 @@ msgstr "எந்த argument-ம் தரப்படவில்லை" msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "கோப்பு சேமிக்கப்பட்டது" - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "ஆவணத்தை சேமிக்க இயலவில்லை" - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "கொடுக்கப்பட்ட argument-களின் எண்ணிக்கை தவறு" -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "" -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "" -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "" -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "" -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "" -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Argument ஒரு எண்ணாக இருக்க வேண்டும்" @@ -260,317 +247,325 @@ msgid "Images" msgstr "" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Zoom அமைப்பு" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "இரு பக்கங்களுக்கிடையில் உள்ள நிரப்பல்(padding)" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "ஒரு வரிசையில் எத்தனை பக்கங்களைக் காட்ட வேண்டும்" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "திரை உருளல்(scroll) அளவு" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "முடிந்தவரை சிறியதாகக் காட்டு" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "முடிந்தவரை பெரிதாகக் காட்டு" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" +msgid "Color for highlighting (active)" msgstr "" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "புதிய bookmark உருவாக்கு" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Bookmark-ஐ அழித்துவிடு" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "அனைத்து bookmark-களையும் பட்டியலிடு" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "ஆவணம் பற்றிய தகவல்களைக் காட்டு" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "உதவியைக் காட்டு" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "ஒரு ஆவணத்தைத் திற" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "zathura-வை விட்டு வெளியேறு" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "ஆவணத்தை அச்சிடு" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "ஆவணத்தை சேமிக்கவும்" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "இணைப்புகளைச் சேமிக்கவும்" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "" @@ -592,79 +587,93 @@ msgstr "" msgid "Link: %s" msgstr "" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "" -#: zathura/main.c:146 -msgid "Reparents to window specified by xid (X11)" +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" msgstr "" -#: zathura/main.c:147 -msgid "Path to the config directory" -msgstr "" - -#: zathura/main.c:148 -msgid "Path to the data directory" -msgstr "" - -#: zathura/main.c:149 -msgid "Path to the cache directory" -msgstr "" - -#: zathura/main.c:150 -msgid "Path to the directories containing plugins" +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" msgstr "" #: zathura/main.c:151 -msgid "Fork into the background" +msgid "Reparents to window specified by xid (X11)" msgstr "" #: zathura/main.c:152 -msgid "Document password" +msgid "Path to the config directory" msgstr "" #: zathura/main.c:153 -msgid "Page number to go to" +msgid "Path to the data directory" msgstr "" #: zathura/main.c:154 -msgid "Log level (debug, info, warning, error)" +msgid "Path to the cache directory" msgstr "" #: zathura/main.c:155 -msgid "Print version information" -msgstr "ஆவணம் பற்றிய தகவல்களைக் காட்டு" +msgid "Path to the directories containing plugins" +msgstr "" #: zathura/main.c:156 -msgid "Synctex editor (forwarded to the synctex command)" +msgid "Fork into the background" msgstr "" #: zathura/main.c:157 -msgid "Move to given synctex position" +msgid "Document password" msgstr "" #: zathura/main.c:158 -msgid "Highlight given position in the given process" +msgid "Page number to go to" msgstr "" #: zathura/main.c:159 -msgid "Start in a non-default mode" +msgid "Log level (debug, info, warning, error)" msgstr "" #: zathura/main.c:160 +msgid "Print version information" +msgstr "ஆவணம் பற்றிய தகவல்களைக் காட்டு" + +#: zathura/main.c:161 +msgid "Synctex editor (forwarded to the synctex command)" +msgstr "" + +#: zathura/main.c:162 +msgid "Move to given synctex position" +msgstr "" + +#: zathura/main.c:163 +msgid "Highlight given position in the given process" +msgstr "" + +#: zathura/main.c:164 +msgid "Start in a non-default mode" +msgstr "" + +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "" -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "படத்தை ஒரு பிரதியெடு" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "" @@ -684,35 +693,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "இந்த ஆவணத்தில் எந்த index-ம் இல்லை" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "பெயரற்ற ஆவணம்" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "" -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "ஆவணத்தை சேமிக்க இயலவில்லை" + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "கோப்பு சேமிக்கப்பட்டது" diff --git a/po/tr.po b/po/tr.po index bb01d2e..4eddfcf 100644 --- a/po/tr.po +++ b/po/tr.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-03-30 00:26+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: abc Def \n" "Language-Team: Turkish (http://www.transifex.com/pwmt/zathura/language/tr/)\n" "Language: tr\n" @@ -53,11 +53,6 @@ msgstr "" msgid "Automatic document reloading." msgstr "Otomatik belge yeniden yükleme." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -69,35 +64,35 @@ msgstr "" msgid "'%s' must not be 0. Set to 1." msgstr "" -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Hatalı girdi '%s'" -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Hatalı dizin '%s'" -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Açık belge yok." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Yanlış sayıda argüman" @@ -196,53 +191,45 @@ msgstr "Argüman verilmedi." msgid "Printing is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Belge kaydedildi." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Belge kaydedilemedi." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Yanlış sayıda argüman." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "'%s' eki '%s' konumuna yazılamadı." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "'%s' eki '%s' konumuna yazıldı." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "'%s' eki '%s' konumuna yazıldı." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "'%s' eki '%s' konumuna yazılamadı." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Tanınmayan resim dosyası '%s'" -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Tanınmayan eklenti veya resim dosyası '%s'" -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Argüman bir sayı olmalı." @@ -261,317 +248,325 @@ msgid "Images" msgstr "Resimler" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Veritabanı arkayüzü" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Yakınlaşma/uzaklaşma aralığı" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Sayfalar arasındaki boşluk" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Satır başına sayfa sayısı" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "İlk sayfanın sütunu" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Kaydırma aralığı" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Yatay kaydırma adımı" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Tam ekran kaydırma kaplaması" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "En fazla uzaklaşma" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "En fazla yakınlaşma" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Atlama listesinde hatırlanacak pozisyon sayısı" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Renk değişimi (koyu renk)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Renk değişimi (açık renk)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "İşaretleme rengi" -#: zathura/config.c:216 -msgid "Color for highlighting (active)" -msgstr "İşaretleme rengi (etkin)" - #: zathura/config.c:218 -msgid "'Loading ...' background color" +msgid "Foreground color for highlighting" msgstr "" #: zathura/config.c:220 -msgid "'Loading ...' foreground color" -msgstr "" +msgid "Color for highlighting (active)" +msgstr "İşaretleme rengi (etkin)" -#: zathura/config.c:223 -msgid "Index mode foreground color" +#: zathura/config.c:222 +msgid "'Loading ...' background color" msgstr "" #: zathura/config.c:224 +msgid "'Loading ...' foreground color" +msgstr "" + +#: zathura/config.c:227 +msgid "Index mode foreground color" +msgstr "" + +#: zathura/config.c:228 msgid "Index mode background color" msgstr "" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Sayga rengini değiştir" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "Yeniden renklendirirken renk değerini tut ve sadece parlaklığı ayarla" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Kaydırmayı sarmala" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Satır başına sayfa sayısı" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Yatay olarak ortalanmış büyütme" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Ön plana çıkarmak için saydamlaştır" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "'Yüklüyor ...' yazısını göster" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Dosya açarken ayarla" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Gizli dosyaları ve dizinleri göster" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Dizinleri göster" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "Son dosyaları göster" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Her zaman ilk sayfayı aç" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Arama sonuçlarını vurgula" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Artımlı aramayı etkinleştir" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Kapatınca arama sonuçlarını temizle" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Pencere başlığı olarak dosyanın adını kullan" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Sayfa numarasını pencere başlığında göster" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "Pencere ikonu olarak belgenin ilk sayfasını kullan" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Yer imi ekle" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Yer imi sil" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Yer imlerini listele" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Geçerli dosyayı kapat" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Dosya bilgisi göster" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Bir komut çalıştır" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Yardım bilgisi göster" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Belge aç" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Zathura'yı kapat" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Belge yazdır" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Belgeyi kaydet" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Belgeyi kaydet (ve sormadan üzerine yaz)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Ekleri kaydet" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Sayfa derinliğini ayarla" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Bu belgede bu konumu işaretle" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Seçilen işaretlemeleri sil" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Şuanki arama sonuçlarını vurgulama" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Şuanki arama sonuçlarını vurgula" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Versiyon bilgisi göster" @@ -593,79 +588,93 @@ msgstr "Bağlantı: sayfa %d" msgid "Link: %s" msgstr "Bağlantı: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Bağlantı: Geçersiz" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Xid tarafından belirlendiği gibi bir üst seviye pencereye bağlı (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Ayar dizini adresi" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Veri dizini adresi" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Önbellek dizininin adresi" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Eklentileri içeren dizinin adresi" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Arka planda işlemden çocuk oluştur" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Belge şifresi" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Kayıt seviyesi (hata ayıklama, bilgi, uyarı, hata)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Dosya bilgisi göster" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Yüklüyor ..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Resim kopyala" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Resmi farklı kaydet" @@ -685,35 +694,48 @@ msgstr "" msgid "Invalid adjust mode: %d" msgstr "" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Bu belge fihrist içermiyor" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[İsimsiz]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "" -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "" -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "Şifre girin:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Desteklenmeyen dosya türü. Lütfen gerekli eklentileri yükleyin." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Belge kaydedilemedi." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Belge kaydedildi." diff --git a/po/uk_UA.po b/po/uk_UA.po index 0d4b050..6d82a6e 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: zathura\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-27 10:06+0200\n" -"PO-Revision-Date: 2020-05-06 14:51+0000\n" +"POT-Creation-Date: 2021-07-14 17:36+0200\n" +"PO-Revision-Date: 2020-07-27 08:12+0000\n" "Last-Translator: Юрій Яновський \n" "Language-Team: Ukrainian (Ukraine) (http://www.transifex.com/pwmt/zathura/" "language/uk_UA/)\n" @@ -62,11 +62,6 @@ msgstr "Швидкі закладки та закладки." msgid "Automatic document reloading." msgstr "Автоматичне перезавантаження документів." -#. Translators: Icon of the desktop entry. -#: data/org.pwmt.zathura.desktop.in:9 -msgid "org.pwmt.zathura" -msgstr "org.pwmt.zathura" - #. Translators: Search terms to find this application. Do not translate or #. localize the semicolons. The list must also end with a semicolon. #: data/org.pwmt.zathura.desktop.in:14 @@ -78,35 +73,35 @@ msgstr "PDF;PS;PostScript;DjVU;документ;презентація;пере msgid "'%s' must not be 0. Set to 1." msgstr "'%s' не має дорівнювати 0. Встановити значення 1." -#: zathura/callbacks.c:395 +#: zathura/callbacks.c:396 #, c-format msgid "Invalid input '%s' given." msgstr "Введено неправильні дані '%s'." -#: zathura/callbacks.c:433 +#: zathura/callbacks.c:444 #, c-format msgid "Invalid index '%s' given." msgstr "Вказано невірний покажчик %s." -#: zathura/callbacks.c:674 +#: zathura/callbacks.c:692 #, c-format msgid "Copied selected text to selection %s: %s" msgstr "Скопійовано вибраний текст у вибірку %s: %s" -#: zathura/callbacks.c:706 +#: zathura/callbacks.c:724 #, c-format msgid "Copied selected image to selection %s" msgstr "Скопійовано вибране зображення у вибірку %s" #: zathura/commands.c:36 zathura/commands.c:76 zathura/commands.c:103 #: zathura/commands.c:165 zathura/commands.c:281 zathura/commands.c:311 -#: zathura/commands.c:337 zathura/commands.c:437 zathura/commands.c:569 -#: zathura/shortcuts.c:413 zathura/shortcuts.c:1222 zathura/shortcuts.c:1257 -#: zathura/shortcuts.c:1284 +#: zathura/commands.c:333 zathura/commands.c:429 zathura/commands.c:561 +#: zathura/shortcuts.c:438 zathura/shortcuts.c:1257 zathura/shortcuts.c:1292 +#: zathura/shortcuts.c:1319 msgid "No document opened." msgstr "Жодного документа не відкрито." -#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:442 +#: zathura/commands.c:42 zathura/commands.c:82 zathura/commands.c:434 msgid "Invalid number of arguments given." msgstr "Неправильна кількість наведених аргументів." @@ -205,53 +200,45 @@ msgstr "Жодного аргументу не наведено." msgid "Printing is not permitted in strict sandbox mode" msgstr "Друк заборонено в режимі суворої пісочниці" -#: zathura/commands.c:317 zathura/commands.c:343 -msgid "Document saved." -msgstr "Документ збережено." - -#: zathura/commands.c:319 zathura/commands.c:345 -msgid "Failed to save document." -msgstr "Не вдалося зберегти документ." - -#: zathura/commands.c:322 zathura/commands.c:348 +#: zathura/commands.c:318 zathura/commands.c:340 msgid "Invalid number of arguments." msgstr "Неправильна кількість аргументів." -#: zathura/commands.c:461 +#: zathura/commands.c:453 #, c-format msgid "Couldn't write attachment '%s' to '%s'." msgstr "Неможливо записати вкладення '%s' у '%s'." -#: zathura/commands.c:463 +#: zathura/commands.c:455 #, c-format msgid "Wrote attachment '%s' to '%s'." msgstr "Записано вкладення %s у %s." -#: zathura/commands.c:507 +#: zathura/commands.c:499 #, c-format msgid "Wrote image '%s' to '%s'." msgstr "Зображення записано '% s' до '% s'." -#: zathura/commands.c:509 +#: zathura/commands.c:501 #, c-format msgid "Couldn't write image '%s' to '%s'." msgstr "Не вдалося записати зображення \"%s\" у \"%s\"." -#: zathura/commands.c:516 +#: zathura/commands.c:508 #, c-format msgid "Unknown image '%s'." msgstr "Невідоме зображення '%s'." -#: zathura/commands.c:520 +#: zathura/commands.c:512 #, c-format msgid "Unknown attachment or image '%s'." msgstr "Невідоме вкладення або зображення \"%s\"." -#: zathura/commands.c:538 +#: zathura/commands.c:530 msgid "Exec is not permitted in strict sandbox mode" msgstr "Запуск у суворому режимі пісочниці заборонено" -#: zathura/commands.c:582 +#: zathura/commands.c:574 msgid "Argument must be a number." msgstr "Аргумент повинен бути числом." @@ -270,319 +257,327 @@ msgid "Images" msgstr "Зображення" #. zathura settings -#: zathura/config.c:183 +#: zathura/config.c:185 msgid "Database backend" msgstr "Бекенд бази даних" -#: zathura/config.c:184 +#: zathura/config.c:186 msgid "File monitor backend" msgstr "Бекенд файлового монітора" -#: zathura/config.c:186 +#: zathura/config.c:188 msgid "Zoom step" msgstr "Крок масштабування" -#: zathura/config.c:188 +#: zathura/config.c:190 msgid "Padding between pages" msgstr "Заповнення між сторінками" -#: zathura/config.c:190 +#: zathura/config.c:192 msgid "Number of pages per row" msgstr "Кількість сторінок у рядку" -#: zathura/config.c:192 +#: zathura/config.c:194 msgid "Column of the first page" msgstr "Колонка першої сторінки" -#: zathura/config.c:194 +#: zathura/config.c:196 msgid "Render pages from right to left" msgstr "Відображати сторінки справа наліво" -#: zathura/config.c:196 +#: zathura/config.c:198 msgid "Scroll step" msgstr "Крок прокрутки" -#: zathura/config.c:198 +#: zathura/config.c:200 msgid "Horizontal scroll step" msgstr "Крок горизонтальної прокрутки" -#: zathura/config.c:200 +#: zathura/config.c:202 msgid "Full page scroll overlap" msgstr "Перекривання сторінки при прокрутці" -#: zathura/config.c:202 +#: zathura/config.c:204 msgid "Zoom minimum" msgstr "Мінімальний масштаб" -#: zathura/config.c:204 +#: zathura/config.c:206 msgid "Zoom maximum" msgstr "Максимальний масштаб" -#: zathura/config.c:206 +#: zathura/config.c:208 msgid "Maximum number of pages to keep in the cache" msgstr "Максимальна кількість сторінок, що зберігаються в кеші" -#: zathura/config.c:208 +#: zathura/config.c:210 msgid "Maximum size in pixels of thumbnails to keep in the cache" msgstr "Максимальний розмір у пікселях ескізів, що зберігаються в кеші" -#: zathura/config.c:210 +#: zathura/config.c:212 msgid "Number of positions to remember in the jumplist" msgstr "Довжина історії переходів" -#: zathura/config.c:212 +#: zathura/config.c:214 msgid "Recoloring (dark color)" msgstr "Перефарбування (темний колір)" -#: zathura/config.c:213 +#: zathura/config.c:215 msgid "Recoloring (light color)" msgstr "Перефарбування (світлий колір)" -#: zathura/config.c:214 +#: zathura/config.c:216 msgid "Color for highlighting" msgstr "Колір для виділення" -#: zathura/config.c:216 +#: zathura/config.c:218 +msgid "Foreground color for highlighting" +msgstr "" + +#: zathura/config.c:220 msgid "Color for highlighting (active)" msgstr "Колір для виділення (активний)" -#: zathura/config.c:218 +#: zathura/config.c:222 msgid "'Loading ...' background color" msgstr "'Завантаження ...' колір тла" -#: zathura/config.c:220 +#: zathura/config.c:224 msgid "'Loading ...' foreground color" msgstr "'Завантаження ...' колір переднього плану" -#: zathura/config.c:223 +#: zathura/config.c:227 msgid "Index mode foreground color" msgstr "Колір переднього плану в режимі покажчика" -#: zathura/config.c:224 +#: zathura/config.c:228 msgid "Index mode background color" msgstr "Колір тла у режимі покажчика" -#: zathura/config.c:225 +#: zathura/config.c:229 msgid "Index mode foreground color (active element)" msgstr "Колір переднього плану в режимі покажчика (активний елемент)" -#: zathura/config.c:226 +#: zathura/config.c:230 msgid "Index mode background color (active element)" msgstr "Колір тла у режимі покажчика (активний елемент)" -#: zathura/config.c:229 +#: zathura/config.c:233 msgid "Recolor pages" msgstr "Перефарбувати сторінки" -#: zathura/config.c:231 +#: zathura/config.c:235 msgid "When recoloring keep original hue and adjust lightness only" msgstr "" "Під час перефарбовування зберігати початковий відтінок і регулювати лише " "освітленість" -#: zathura/config.c:233 +#: zathura/config.c:237 msgid "When recoloring keep original image colors" msgstr "Під час перефарбовування зберігати початкові кольори зображення" -#: zathura/config.c:235 +#: zathura/config.c:239 msgid "Wrap scrolling" msgstr "Плавна прокрутка" -#: zathura/config.c:237 +#: zathura/config.c:241 msgid "Page aware scrolling" msgstr "Прокрутка по сторінкам" -#: zathura/config.c:239 +#: zathura/config.c:243 msgid "Advance number of pages per row" msgstr "Збільшити кількість сторінок на рядок" -#: zathura/config.c:241 +#: zathura/config.c:245 msgid "Horizontally centered zoom" msgstr "Горизонтально вирівняний масштаб" -#: zathura/config.c:243 +#: zathura/config.c:247 msgid "Vertically center pages" msgstr "Вертикально вирівнювати сторінки" -#: zathura/config.c:245 +#: zathura/config.c:249 msgid "Align link target to the left" msgstr "Вирівнювати ціль посилання ліворуч" -#: zathura/config.c:247 +#: zathura/config.c:251 msgid "Let zoom be changed when following links" msgstr "Нехай масштабується при переході за посиланнями" -#: zathura/config.c:249 +#: zathura/config.c:253 msgid "Center result horizontally" msgstr "Вирівнювати результат по горизонталі" -#: zathura/config.c:251 +#: zathura/config.c:255 msgid "Transparency for highlighting" msgstr "Прозорість для виділення" -#: zathura/config.c:253 +#: zathura/config.c:257 msgid "Render 'Loading ...'" msgstr "Візуалізація 'Завантаження ...'" -#: zathura/config.c:254 +#: zathura/config.c:258 msgid "Adjust to when opening file" msgstr "Підлаштовуватись при відкритті файлу" -#: zathura/config.c:256 +#: zathura/config.c:260 msgid "Show hidden files and directories" msgstr "Показати приховані файли та каталоги" -#: zathura/config.c:258 +#: zathura/config.c:262 msgid "Show directories" msgstr "Показати каталоги" -#: zathura/config.c:260 +#: zathura/config.c:264 msgid "Show recent files" msgstr "Показати нещодавні файли" -#: zathura/config.c:262 +#: zathura/config.c:266 msgid "Always open on first page" msgstr "Завжди відкривати на першій сторінці" -#: zathura/config.c:264 +#: zathura/config.c:268 msgid "Highlight search results" msgstr "Виділяти результати пошуку" -#: zathura/config.c:267 +#: zathura/config.c:271 msgid "Enable incremental search" msgstr "Увімкнути поступовий пошук" -#: zathura/config.c:269 +#: zathura/config.c:273 msgid "Clear search results on abort" msgstr "Очистити результати пошуку при скасуванні" -#: zathura/config.c:271 +#: zathura/config.c:275 msgid "Use basename of the file in the window title" msgstr "Використовувати базове ім'я файлу у заголовку вікна" -#: zathura/config.c:273 +#: zathura/config.c:277 msgid "Use ~ instead of $HOME in the filename in the window title" msgstr "Використовати ~ замість $HOME у назві файла у заголовку вікна" -#: zathura/config.c:275 +#: zathura/config.c:279 msgid "Display the page number in the window title" msgstr "Відображати номер сторінки у назві вікна" -#: zathura/config.c:277 +#: zathura/config.c:281 msgid "Use first page of a document as window icon" msgstr "Використовувати першу сторінку документа як піктограму вікна" -#: zathura/config.c:279 +#: zathura/config.c:283 msgid "Use basename of the file in the statusbar" msgstr "Використовувати базове ім'я файлу на панелі стану" -#: zathura/config.c:281 +#: zathura/config.c:285 msgid "Use ~ instead of $HOME in the filename in the statusbar" msgstr "Використовувати ~ замість $HOME у назві файлу на панелі стану" -#: zathura/config.c:283 +#: zathura/config.c:287 msgid "Enable synctex support" msgstr "Увімкнути підтримку Synctex" -#: zathura/config.c:284 +#: zathura/config.c:288 msgid "Synctex editor command" msgstr "Команда редактора Synctex" -#: zathura/config.c:286 +#: zathura/config.c:290 msgid "Enable D-Bus service" msgstr "Увімкнути службу D-Bus" -#: zathura/config.c:288 +#: zathura/config.c:291 +msgid "Raise window on certain D-Bus commands" +msgstr "" + +#: zathura/config.c:293 msgid "Save history at each page change" msgstr "Зберігати історію при кожній зміні сторінки" -#: zathura/config.c:289 +#: zathura/config.c:294 msgid "The clipboard into which mouse-selected data will be written" msgstr "Буфер обміну, в який будуть записані дані, вибрані мишею" -#: zathura/config.c:291 +#: zathura/config.c:296 msgid "Enable notification after selecting text" msgstr "Увімкніть сповіщення після вибору тексту" -#: zathura/config.c:294 +#: zathura/config.c:299 msgid "Sandbox level" msgstr "Рівень пісочниці" #. define default inputbar commands -#: zathura/config.c:485 +#: zathura/config.c:491 msgid "Add a bookmark" msgstr "Додати закладку" -#: zathura/config.c:486 +#: zathura/config.c:492 msgid "Delete a bookmark" msgstr "Вилучити закладку" -#: zathura/config.c:487 +#: zathura/config.c:493 msgid "List all bookmarks" msgstr "Список усіх закладок" -#: zathura/config.c:488 +#: zathura/config.c:494 msgid "Close current file" msgstr "Закрити поточний файл" -#: zathura/config.c:489 +#: zathura/config.c:495 msgid "Show file information" msgstr "Показати інформацію про файл" -#: zathura/config.c:490 zathura/config.c:491 +#: zathura/config.c:496 zathura/config.c:497 msgid "Execute a command" msgstr "Виконати команду" #. like vim -#: zathura/config.c:492 +#: zathura/config.c:498 msgid "Show help" msgstr "Покажіть довідку" -#: zathura/config.c:493 +#: zathura/config.c:499 msgid "Open document" msgstr "Відкрити документ" -#: zathura/config.c:494 +#: zathura/config.c:500 msgid "Close zathura" msgstr "Закрити zathura" -#: zathura/config.c:495 +#: zathura/config.c:501 msgid "Print document" msgstr "Надрукувати документ" -#: zathura/config.c:496 +#: zathura/config.c:502 zathura/config.c:504 msgid "Save document" msgstr "Зберегти документ" -#: zathura/config.c:497 +#: zathura/config.c:503 zathura/config.c:505 msgid "Save document (and force overwriting)" msgstr "Зберегти документ (і примусово перезаписати)" -#: zathura/config.c:498 +#: zathura/config.c:506 msgid "Save attachments" msgstr "Зберегти вкладення" -#: zathura/config.c:499 +#: zathura/config.c:507 msgid "Set page offset" msgstr "Встановити зміщення сторінки" -#: zathura/config.c:500 +#: zathura/config.c:508 msgid "Mark current location within the document" msgstr "Позначити поточне розташування в документі" -#: zathura/config.c:501 +#: zathura/config.c:509 msgid "Delete the specified marks" msgstr "Вилучити зазначені позначки" -#: zathura/config.c:502 +#: zathura/config.c:510 msgid "Don't highlight current search results" msgstr "Не виділяти поточні результати пошуку" -#: zathura/config.c:503 +#: zathura/config.c:511 msgid "Highlight current search results" msgstr "Виділити поточні результати пошуку" -#: zathura/config.c:504 +#: zathura/config.c:512 msgid "Show version information" msgstr "Показати інформацію про версію" @@ -604,79 +599,93 @@ msgstr "Посилання: сторінка %d" msgid "Link: %s" msgstr "Посилання: %s" -#: zathura/links.c:291 +#: zathura/links.c:291 zathura/links.c:318 msgid "Link: Invalid" msgstr "Посилання: Недійсне" -#: zathura/main.c:146 +#: zathura/links.c:305 +#, c-format +msgid "Copied page number: %d" +msgstr "" + +#: zathura/links.c:314 +#, c-format +msgid "Copied link: %s" +msgstr "" + +#: zathura/main.c:151 msgid "Reparents to window specified by xid (X11)" msgstr "Повертатися до вікна, вказаного за допомогою xid (X11)" -#: zathura/main.c:147 +#: zathura/main.c:152 msgid "Path to the config directory" msgstr "Шлях до каталогу конфігурації" -#: zathura/main.c:148 +#: zathura/main.c:153 msgid "Path to the data directory" msgstr "Шлях до каталогу з даними" -#: zathura/main.c:149 +#: zathura/main.c:154 msgid "Path to the cache directory" msgstr "Шлях до каталогу кеша" -#: zathura/main.c:150 +#: zathura/main.c:155 msgid "Path to the directories containing plugins" msgstr "Шлях до каталогів, які містять плаґіни" -#: zathura/main.c:151 +#: zathura/main.c:156 msgid "Fork into the background" msgstr "Запустити у фоні" -#: zathura/main.c:152 +#: zathura/main.c:157 msgid "Document password" msgstr "Пароль документа" -#: zathura/main.c:153 +#: zathura/main.c:158 msgid "Page number to go to" msgstr "Номер сторінки, на який потрібно перейти" -#: zathura/main.c:154 +#: zathura/main.c:159 msgid "Log level (debug, info, warning, error)" msgstr "Рівень журналювання (налагодження, інформація, попередження, помилка)" -#: zathura/main.c:155 +#: zathura/main.c:160 msgid "Print version information" msgstr "Інформація про версію для друку" -#: zathura/main.c:156 +#: zathura/main.c:161 msgid "Synctex editor (forwarded to the synctex command)" msgstr "Редактор Synctex (перенаправляється до команди Synctex)" -#: zathura/main.c:157 +#: zathura/main.c:162 msgid "Move to given synctex position" msgstr "Перейдіть до заданої позиції Synctex" -#: zathura/main.c:158 +#: zathura/main.c:163 msgid "Highlight given position in the given process" msgstr "Виділити задану позицію в даному процесі" -#: zathura/main.c:159 +#: zathura/main.c:164 msgid "Start in a non-default mode" msgstr "Запуск в режимі, що не використовується за замовчуванням" -#: zathura/main.c:160 +#: zathura/main.c:165 +msgid "Bookmark to go to" +msgstr "" + +#: zathura/main.c:166 msgid "Search for the given phrase and display results" msgstr "" -#: zathura/page-widget.c:654 +#: zathura/page-widget.c:655 msgid "Loading..." msgstr "Завантаження..." -#: zathura/page-widget.c:1113 +#: zathura/page-widget.c:1114 msgid "Copy image" msgstr "Скопіювати зображення" -#: zathura/page-widget.c:1114 +#: zathura/page-widget.c:1115 msgid "Save image as" msgstr "Зберегти зображення як" @@ -696,35 +705,51 @@ msgstr "Не вдалося надрукувати: %s" msgid "Invalid adjust mode: %d" msgstr "Недійсний режим коригування: %d" -#: zathura/shortcuts.c:974 +#: zathura/shortcuts.c:999 #, c-format msgid "Pattern not found: %s" msgstr "Шаблон не знайдено: %s" -#: zathura/shortcuts.c:1132 +#: zathura/shortcuts.c:1159 msgid "This document does not contain any index" msgstr "Цей документ не містить покажчика" -#: zathura/zathura.c:303 zathura/zathura.c:1482 +#: zathura/zathura.c:305 zathura/zathura.c:1500 msgid "[No name]" msgstr "[Без імені]" -#: zathura/zathura.c:835 +#: zathura/zathura.c:837 msgid "Could not read file from stdin and write it to a temporary file." msgstr "Не вдалося прочитати файл із stdin та записати його у тимчасовий файл." -#: zathura/zathura.c:855 +#: zathura/zathura.c:857 msgid "Could not read file from GIO and copy it to a temporary file." msgstr "Не вдалося прочитати файл із GIO та скопіювати його у тимчасовий файл." -#: zathura/zathura.c:952 +#: zathura/zathura.c:961 msgid "Enter password:" msgstr "Введіть пароль:" -#: zathura/zathura.c:991 +#: zathura/zathura.c:1000 msgid "Unsupported file type. Please install the necessary plugin." msgstr "Непідтримуваний тип файлу. Установіть необхідне розширення." -#: zathura/zathura.c:1001 +#: zathura/zathura.c:1010 msgid "Document does not contain any pages" msgstr "Документ не містить жодної сторінки" + +#: zathura/zathura.c:1371 +#, c-format +msgid "File already exists: %s. Use :write! to overwrite it." +msgstr "" + +#: zathura/zathura.c:1380 +msgid "Failed to save document." +msgstr "Не вдалося зберегти документ." + +#: zathura/zathura.c:1384 +msgid "Document saved." +msgstr "Документ збережено." + +#~ msgid "org.pwmt.zathura" +#~ msgstr "org.pwmt.zathura" diff --git a/zathura/adjustment.c b/zathura/adjustment.c index 5163d04..84fedf8 100644 --- a/zathura/adjustment.c +++ b/zathura/adjustment.c @@ -5,22 +5,23 @@ #include -double page_calc_height_width(zathura_document_t *document, double height, - double width, unsigned int *page_height, - unsigned int *page_width, bool rotate) { - g_return_val_if_fail( - document != NULL && page_height != NULL && page_width != NULL, 0.0); +double +page_calc_height_width(zathura_document_t* document, double height, + double width, unsigned int* page_height, + unsigned int* page_width, bool rotate) +{ + g_return_val_if_fail(document != NULL && page_height != NULL && page_width != NULL, 0.0); double scale = zathura_document_get_scale(document); // TODO this just set all pages to the maximum. // needs to adjust cell size based on the page size itself. if (rotate == true && zathura_document_get_rotation(document) % 180 != 0) { - *page_width = round(height * scale); - *page_height = round(width * scale); + *page_width = round(height * scale); + *page_height = round(width * scale); scale = MAX(*page_width / height, *page_height / width); } else { - *page_width = round(width * scale); + *page_width = round(width * scale); *page_height = round(height * scale); scale = MAX(*page_width / width, *page_height / height); } @@ -28,8 +29,10 @@ double page_calc_height_width(zathura_document_t *document, double height, return scale; } -void page_calc_position(zathura_document_t *document, double x, double y, - double *xn, double *yn) { +void +page_calc_position(zathura_document_t* document, double x, double y, double* xn, + double* yn) +{ g_return_if_fail(document != NULL && xn != NULL && yn != NULL); const unsigned int rot = zathura_document_get_rotation(document); @@ -48,8 +51,10 @@ void page_calc_position(zathura_document_t *document, double x, double y, } } -unsigned int position_to_page_number(zathura_document_t *document, double pos_x, - double pos_y) { +unsigned int +position_to_page_number(zathura_document_t* document, double pos_x, + double pos_y) +{ g_return_val_if_fail(document != NULL, 0); unsigned int doc_width, doc_height; @@ -58,11 +63,11 @@ unsigned int position_to_page_number(zathura_document_t *document, double pos_x, unsigned int cell_width, cell_height; zathura_document_get_cell_size(document, &cell_height, &cell_width); - unsigned int c0 = zathura_document_get_first_page_column(document); + unsigned int c0 = zathura_document_get_first_page_column(document); unsigned int npag = zathura_document_get_number_of_pages(document); unsigned int ncol = zathura_document_get_pages_per_row(document); unsigned int nrow = 0; - unsigned int pad = zathura_document_get_page_padding(document); + unsigned int pad = zathura_document_get_page_padding(document); if (c0 == 1) { /* There is no offset, so this is easy. */ @@ -72,10 +77,8 @@ unsigned int position_to_page_number(zathura_document_t *document, double pos_x, nrow = 1 + (npag - (ncol - c0 - 1) + (ncol - 1)) / ncol; } - unsigned int col = - floor(pos_x * (double)doc_width / (double)(cell_width + pad)); - unsigned int row = - floor(pos_y * (double)doc_height / (double)(cell_height + pad)); + unsigned int col = floor(pos_x * (double)doc_width / (double)(cell_width + pad)); + unsigned int row = floor(pos_y * (double)doc_height / (double)(cell_height + pad)); unsigned int page = ncol * (row % nrow) + (col % ncol); if (page < c0 - 1) { @@ -85,19 +88,22 @@ unsigned int position_to_page_number(zathura_document_t *document, double pos_x, } } -void page_number_to_position(zathura_document_t *document, - unsigned int page_number, double xalign, - double yalign, double *pos_x, double *pos_y) { + +void +page_number_to_position(zathura_document_t* document, unsigned int page_number, + double xalign, double yalign, double* pos_x, + double* pos_y) +{ g_return_if_fail(document != NULL); - unsigned int c0 = zathura_document_get_first_page_column(document); + unsigned int c0 = zathura_document_get_first_page_column(document); unsigned int npag = zathura_document_get_number_of_pages(document); unsigned int ncol = zathura_document_get_pages_per_row(document); - unsigned int nrow = (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */ + unsigned int nrow = (npag + c0 - 1 + ncol - 1) / ncol; /* number of rows */ /* row and column for page_number indexed from 0 */ - unsigned int row = (page_number + c0 - 1) / ncol; - unsigned int col = (page_number + c0 - 1) % ncol; + unsigned int row = (page_number + c0 - 1) / ncol; + unsigned int col = (page_number + c0 - 1) % ncol; /* sizes of page cell, viewport and document */ unsigned int cell_height = 0, cell_width = 0; @@ -109,18 +115,14 @@ void page_number_to_position(zathura_document_t *document, unsigned int doc_height = 0, doc_width = 0; zathura_document_get_document_size(document, &doc_height, &doc_width); - /* compute the shift to align to the viewport. If the page fits to viewport, - * just center it. */ + /* compute the shift to align to the viewport. If the page fits to viewport, just center it. */ double shift_x = 0.5, shift_y = 0.5; if (cell_width > view_width) { - shift_x = 0.5 + (xalign - 0.5) * ((double)cell_width - (double)view_width) / - (double)cell_width; + shift_x = 0.5 + (xalign - 0.5) * ((double)cell_width - (double)view_width) / (double)cell_width; } if (cell_height > view_height) { - shift_y = 0.5 + (yalign - 0.5) * - ((double)cell_height - (double)view_height) / - (double)cell_height; + shift_y = 0.5 + (yalign - 0.5) * ((double)cell_height - (double)view_height) / (double)cell_height; } /* compute the position */ @@ -128,7 +130,10 @@ void page_number_to_position(zathura_document_t *document, *pos_y = ((double)row + shift_y) / (double)nrow; } -bool page_is_visible(zathura_document_t *document, unsigned int page_number) { + +bool +page_is_visible(zathura_document_t *document, unsigned int page_number) +{ g_return_val_if_fail(document != NULL, false); /* position at the center of the viewport */ @@ -148,31 +153,35 @@ bool page_is_visible(zathura_document_t *document, unsigned int page_number) { unsigned int view_width, view_height; zathura_document_get_viewport_size(document, &view_height, &view_width); - return (fabs(pos_x - page_x) < - 0.5 * (double)(view_width + cell_width) / (double)doc_width && - fabs(pos_y - page_y) < - 0.5 * (double)(view_height + cell_height) / (double)doc_height); + return ( fabs(pos_x - page_x) < 0.5 * (double)(view_width + cell_width) / (double)doc_width && + fabs(pos_y - page_y) < 0.5 * (double)(view_height + cell_height) / (double)doc_height); } -void zathura_adjustment_set_value(GtkAdjustment *adjustment, gdouble value) { - const gdouble lower = gtk_adjustment_get_lower(adjustment); +void +zathura_adjustment_set_value(GtkAdjustment* adjustment, gdouble value) +{ + const gdouble lower = gtk_adjustment_get_lower(adjustment); const gdouble upper_m_size = gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment); gtk_adjustment_set_value(adjustment, MAX(lower, MIN(upper_m_size, value))); } -gdouble zathura_adjustment_get_ratio(GtkAdjustment *adjustment) { - gdouble lower = gtk_adjustment_get_lower(adjustment); - gdouble upper = gtk_adjustment_get_upper(adjustment); +gdouble +zathura_adjustment_get_ratio(GtkAdjustment* adjustment) +{ + gdouble lower = gtk_adjustment_get_lower(adjustment); + gdouble upper = gtk_adjustment_get_upper(adjustment); gdouble page_size = gtk_adjustment_get_page_size(adjustment); - gdouble value = gtk_adjustment_get_value(adjustment); + gdouble value = gtk_adjustment_get_value(adjustment); return (value - lower + page_size / 2.0) / (upper - lower); } -void zathura_adjustment_set_value_from_ratio(GtkAdjustment *adjustment, - gdouble ratio) { +void +zathura_adjustment_set_value_from_ratio(GtkAdjustment* adjustment, + gdouble ratio) +{ if (ratio == 0.0) { return; } diff --git a/zathura/config.c b/zathura/config.c index 567d3d8..8f76a71 100644 --- a/zathura/config.c +++ b/zathura/config.c @@ -57,6 +57,8 @@ cb_color_change(girara_session_t* session, const char* name, const char* string_value = (const char*) value; if (g_strcmp0(name, "highlight-color") == 0) { parse_color(&zathura->ui.colors.highlight_color, string_value); + } else if (g_strcmp0(name, "highlight-fg") == 0) { + parse_color(&zathura->ui.colors.highlight_color_fg, string_value); } else if (g_strcmp0(name, "highlight-active-color") == 0) { parse_color(&zathura->ui.colors.highlight_color_active, string_value); } else if (g_strcmp0(name, "recolor-darkcolor") == 0) { @@ -209,15 +211,17 @@ config_load_default(zathura_t* zathura) int_value = 2000; girara_setting_add(gsession, "jumplist-size", &int_value, INT, false, _("Number of positions to remember in the jumplist"), cb_jumplist_change, NULL); - girara_setting_add(gsession, "recolor-darkcolor", "#FFFFFF", STRING, false, _("Recoloring (dark color)"), cb_color_change, NULL); - girara_setting_add(gsession, "recolor-lightcolor", "#000000", STRING, false, _("Recoloring (light color)"), cb_color_change, NULL); - girara_setting_add(gsession, "highlight-color", NULL, STRING, false, _("Color for highlighting"), cb_color_change, NULL); + girara_setting_add(gsession, "recolor-darkcolor", "#FFFFFF", STRING, false, _("Recoloring (dark color)"), cb_color_change, NULL); + girara_setting_add(gsession, "recolor-lightcolor", "#000000", STRING, false, _("Recoloring (light color)"), cb_color_change, NULL); + girara_setting_add(gsession, "highlight-color", NULL, STRING, false, _("Color for highlighting"), cb_color_change, NULL); girara_setting_set(gsession, "highlight-color", "#9FBC00"); - girara_setting_add(gsession, "highlight-active-color", NULL, STRING, false, _("Color for highlighting (active)"), cb_color_change, NULL); + girara_setting_add(gsession, "highlight-fg", NULL, STRING, false, _("Foreground color for highlighting"), cb_color_change, NULL); + girara_setting_set(gsession, "highlight-fg", "#000000"); + girara_setting_add(gsession, "highlight-active-color", NULL, STRING, false, _("Color for highlighting (active)"), cb_color_change, NULL); girara_setting_set(gsession, "highlight-active-color", "#00BC00"); - girara_setting_add(gsession, "render-loading-bg", NULL, STRING, false, _("'Loading ...' background color"), cb_color_change, NULL); + girara_setting_add(gsession, "render-loading-bg", NULL, STRING, false, _("'Loading ...' background color"), cb_color_change, NULL); girara_setting_set(gsession, "render-loading-bg", "#FFFFFF"); - girara_setting_add(gsession, "render-loading-fg", NULL, STRING, false, _("'Loading ...' foreground color"), cb_color_change, NULL); + girara_setting_add(gsession, "render-loading-fg", NULL, STRING, false, _("'Loading ...' foreground color"), cb_color_change, NULL); girara_setting_set(gsession, "render-loading-fg", "#000000"); girara_setting_add(gsession, "index-fg", "#DDDDDD", STRING, true, _("Index mode foreground color"), NULL, NULL); @@ -284,6 +288,7 @@ config_load_default(zathura_t* zathura) girara_setting_add(gsession, "synctex-editor-command", "", STRING, false, _("Synctex editor command"), NULL, NULL); bool_value = true; girara_setting_add(gsession, "dbus-service", &bool_value, BOOLEAN, false, _("Enable D-Bus service"), NULL, NULL); + girara_setting_add(gsession, "dbus-raise-window", &bool_value, BOOLEAN, false, _("Raise window on certain D-Bus commands"), NULL, NULL); bool_value = false; girara_setting_add(gsession, "continuous-hist-save", &bool_value, BOOLEAN, false, _("Save history at each page change"), NULL, NULL); girara_setting_add(gsession, "selection-clipboard", "primary", STRING, false, _("The clipboard into which mouse-selected data will be written"), NULL, NULL); diff --git a/zathura/render.c b/zathura/render.c index 9f23c2b..b5a1041 100644 --- a/zathura/render.c +++ b/zathura/render.c @@ -1,23 +1,22 @@ /* SPDX-License-Identifier: Zlib */ -#include -#include #include #include +#include +#include -#include "adjustment.h" -#include "document.h" -#include "page-widget.h" -#include "page.h" #include "render.h" -#include "utils.h" +#include "adjustment.h" #include "zathura.h" -#include +#include "document.h" +#include "page.h" +#include "page-widget.h" +#include "utils.h" /* private data for ZathuraRenderer */ typedef struct private_s { - GThreadPool *pool; /**< Pool of threads */ - GMutex mutex; /**< Render lock */ + GThreadPool* pool; /**< Pool of threads */ + GMutex mutex; /**< Render lock */ volatile bool about_to_close; /**< Render thread is to be freed */ /** @@ -36,60 +35,61 @@ typedef struct private_s { * page cache */ struct { - int *cache; + int* cache; size_t size; size_t num_cached_pages; } page_cache; /* render requests */ - girara_list_t *requests; + girara_list_t* requests; } ZathuraRendererPrivate; /* private data for ZathuraRenderRequest */ typedef struct request_private_s { - ZathuraRenderer *renderer; - zathura_page_t *page; + ZathuraRenderer* renderer; + zathura_page_t* page; gint64 last_view_time; - girara_list_t *active_jobs; + girara_list_t* active_jobs; GMutex jobs_mutex; bool render_plain; } ZathuraRenderRequestPrivate; /* define the two types */ -G_DEFINE_TYPE_WITH_CODE(ZathuraRenderer, zathura_renderer, G_TYPE_OBJECT, - G_ADD_PRIVATE(ZathuraRenderer)) -G_DEFINE_TYPE_WITH_CODE(ZathuraRenderRequest, zathura_render_request, - G_TYPE_OBJECT, G_ADD_PRIVATE(ZathuraRenderRequest)) +G_DEFINE_TYPE_WITH_CODE(ZathuraRenderer, zathura_renderer, G_TYPE_OBJECT, G_ADD_PRIVATE(ZathuraRenderer)) +G_DEFINE_TYPE_WITH_CODE(ZathuraRenderRequest, zathura_render_request, G_TYPE_OBJECT, G_ADD_PRIVATE(ZathuraRenderRequest)) /* private methods for ZathuraRenderer */ -static void renderer_finalize(GObject *object); +static void renderer_finalize(GObject* object); /* private methods for ZathuraRenderRequest */ -static void render_request_dispose(GObject *object); -static void render_request_finalize(GObject *object); +static void render_request_dispose(GObject* object); +static void render_request_finalize(GObject* object); -static void render_job(void *data, void *user_data); +static void render_job(void* data, void* user_data); static gint render_thread_sort(gconstpointer a, gconstpointer b, gpointer data); -static ssize_t page_cache_lru_invalidate(ZathuraRenderer *renderer); -static void page_cache_invalidate_all(ZathuraRenderer *renderer); -static bool page_cache_is_full(ZathuraRenderer *renderer, bool *result); +static ssize_t page_cache_lru_invalidate(ZathuraRenderer* renderer); +static void page_cache_invalidate_all(ZathuraRenderer* renderer); +static bool page_cache_is_full(ZathuraRenderer* renderer, bool* result); /* job descritption for render thread */ typedef struct render_job_s { - ZathuraRenderRequest *request; + ZathuraRenderRequest* request; volatile bool aborted; } render_job_t; /* init, new and free for ZathuraRenderer */ -static void zathura_renderer_class_init(ZathuraRendererClass *class) { +static void +zathura_renderer_class_init(ZathuraRendererClass* class) +{ /* overwrite methods */ - GObjectClass *object_class = G_OBJECT_CLASS(class); - object_class->finalize = renderer_finalize; + GObjectClass* object_class = G_OBJECT_CLASS(class); + object_class->finalize = renderer_finalize; } -static void zathura_renderer_init(ZathuraRenderer *renderer) { - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); +static void +zathura_renderer_init(ZathuraRenderer* renderer) +{ + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); priv->pool = g_thread_pool_new(render_job, renderer, 1, TRUE, NULL); priv->about_to_close = false; g_thread_pool_set_sort_function(priv->pool, render_thread_sort, NULL); @@ -110,11 +110,12 @@ static void zathura_renderer_init(ZathuraRenderer *renderer) { priv->requests = girara_list_new(); } -static bool page_cache_init(ZathuraRenderer *renderer, size_t cache_size) { - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); +static bool +page_cache_init(ZathuraRenderer* renderer, size_t cache_size) +{ + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); - priv->page_cache.size = cache_size; + priv->page_cache.size = cache_size; priv->page_cache.cache = g_try_malloc0(cache_size * sizeof(int)); if (priv->page_cache.cache == NULL) { return false; @@ -124,11 +125,13 @@ static bool page_cache_init(ZathuraRenderer *renderer, size_t cache_size) { return true; } -ZathuraRenderer *zathura_renderer_new(size_t cache_size) { +ZathuraRenderer* +zathura_renderer_new(size_t cache_size) +{ g_return_val_if_fail(cache_size > 0, NULL); - GObject *obj = g_object_new(ZATHURA_TYPE_RENDERER, NULL); - ZathuraRenderer *ret = ZATHURA_RENDERER(obj); + GObject* obj = g_object_new(ZATHURA_TYPE_RENDERER, NULL); + ZathuraRenderer* ret = ZATHURA_RENDERER(obj); if (page_cache_init(ret, cache_size) == false) { g_object_unref(obj); @@ -138,10 +141,11 @@ ZathuraRenderer *zathura_renderer_new(size_t cache_size) { return ret; } -static void renderer_finalize(GObject *object) { - ZathuraRenderer *renderer = ZATHURA_RENDERER(object); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); +static void +renderer_finalize(GObject* object) +{ + ZathuraRenderer* renderer = ZATHURA_RENDERER(object); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); zathura_renderer_stop(renderer); if (priv->pool != NULL) { @@ -155,17 +159,19 @@ static void renderer_finalize(GObject *object) { /* (un)register requests at the renderer */ -static void renderer_unregister_request(ZathuraRenderer *renderer, - ZathuraRenderRequest *request) { - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); +static void +renderer_unregister_request(ZathuraRenderer* renderer, + ZathuraRenderRequest* request) +{ + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); girara_list_remove(priv->requests, request); } -static void renderer_register_request(ZathuraRenderer *renderer, - ZathuraRenderRequest *request) { - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); +static void +renderer_register_request(ZathuraRenderer* renderer, + ZathuraRenderRequest* request) +{ + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); if (girara_list_contains(priv->requests, request) == false) { girara_list_append(priv->requests, request); } @@ -180,47 +186,68 @@ enum { REQUEST_LAST_SIGNAL }; -static guint request_signals[REQUEST_LAST_SIGNAL] = {0}; +static guint request_signals[REQUEST_LAST_SIGNAL] = { 0 }; static void -zathura_render_request_class_init(ZathuraRenderRequestClass *class) { +zathura_render_request_class_init(ZathuraRenderRequestClass* class) +{ /* overwrite methods */ - GObjectClass *object_class = G_OBJECT_CLASS(class); - object_class->dispose = render_request_dispose; - object_class->finalize = render_request_finalize; + GObjectClass* object_class = G_OBJECT_CLASS(class); + object_class->dispose = render_request_dispose; + object_class->finalize = render_request_finalize; - request_signals[REQUEST_COMPLETED] = g_signal_new( - "completed", ZATHURA_TYPE_RENDER_REQUEST, G_SIGNAL_RUN_LAST, 0, NULL, - NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_POINTER); + request_signals[REQUEST_COMPLETED] = g_signal_new("completed", + ZATHURA_TYPE_RENDER_REQUEST, + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 1, + G_TYPE_POINTER); - request_signals[REQUEST_CACHE_ADDED] = g_signal_new( - "cache-added", ZATHURA_TYPE_RENDER_REQUEST, G_SIGNAL_RUN_LAST, 0, NULL, - NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0); + request_signals[REQUEST_CACHE_ADDED] = g_signal_new("cache-added", + ZATHURA_TYPE_RENDER_REQUEST, + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); - request_signals[REQUEST_CACHE_INVALIDATED] = g_signal_new( - "cache-invalidated", ZATHURA_TYPE_RENDER_REQUEST, G_SIGNAL_RUN_LAST, 0, - NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 0); + request_signals[REQUEST_CACHE_INVALIDATED] = g_signal_new("cache-invalidated", + ZATHURA_TYPE_RENDER_REQUEST, + G_SIGNAL_RUN_LAST, + 0, + NULL, + NULL, + g_cclosure_marshal_generic, + G_TYPE_NONE, + 0); } -static void zathura_render_request_init(ZathuraRenderRequest *request) { - ZathuraRenderRequestPrivate *priv = - zathura_render_request_get_instance_private(request); +static void +zathura_render_request_init(ZathuraRenderRequest* request) +{ + ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); priv->renderer = NULL; priv->page = NULL; } -ZathuraRenderRequest *zathura_render_request_new(ZathuraRenderer *renderer, - zathura_page_t *page) { +ZathuraRenderRequest* +zathura_render_request_new(ZathuraRenderer* renderer, zathura_page_t* page) +{ g_return_val_if_fail(renderer != NULL && page != NULL, NULL); - GObject *obj = g_object_new(ZATHURA_TYPE_RENDER_REQUEST, NULL); + GObject* obj = g_object_new(ZATHURA_TYPE_RENDER_REQUEST, NULL); if (obj == NULL) { return NULL; } - ZathuraRenderRequest *request = ZATHURA_RENDER_REQUEST(obj); - ZathuraRenderRequestPrivate *priv = - zathura_render_request_get_instance_private(request); + ZathuraRenderRequest* request = ZATHURA_RENDER_REQUEST(obj); + ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); /* we want to make sure that renderer lives long enough */ priv->renderer = g_object_ref(renderer); priv->page = page; @@ -234,10 +261,11 @@ ZathuraRenderRequest *zathura_render_request_new(ZathuraRenderer *renderer, return request; } -static void render_request_dispose(GObject *object) { - ZathuraRenderRequest *request = ZATHURA_RENDER_REQUEST(object); - ZathuraRenderRequestPrivate *priv = - zathura_render_request_get_instance_private(request); +static void +render_request_dispose(GObject* object) +{ + ZathuraRenderRequest* request = ZATHURA_RENDER_REQUEST(object); + ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); if (priv->renderer != NULL) { /* unregister the request */ @@ -249,10 +277,11 @@ static void render_request_dispose(GObject *object) { G_OBJECT_CLASS(zathura_render_request_parent_class)->dispose(object); } -static void render_request_finalize(GObject *object) { - ZathuraRenderRequest *request = ZATHURA_RENDER_REQUEST(object); - ZathuraRenderRequestPrivate *priv = - zathura_render_request_get_instance_private(request); +static void +render_request_finalize(GObject* object) +{ + ZathuraRenderRequest* request = ZATHURA_RENDER_REQUEST(object); + ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); if (girara_list_size(priv->active_jobs) != 0) { girara_error("This should not happen!"); @@ -265,62 +294,66 @@ static void render_request_finalize(GObject *object) { /* renderer methods */ -bool zathura_renderer_recolor_enabled(ZathuraRenderer *renderer) { +bool +zathura_renderer_recolor_enabled(ZathuraRenderer* renderer) +{ g_return_val_if_fail(ZATHURA_IS_RENDERER(renderer), false); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); return priv->recolor.enabled; } -void zathura_renderer_enable_recolor(ZathuraRenderer *renderer, bool enable) { +void +zathura_renderer_enable_recolor(ZathuraRenderer* renderer, bool enable) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); priv->recolor.enabled = enable; } -bool zathura_renderer_recolor_hue_enabled(ZathuraRenderer *renderer) { +bool +zathura_renderer_recolor_hue_enabled(ZathuraRenderer* renderer) +{ g_return_val_if_fail(ZATHURA_IS_RENDERER(renderer), false); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); return priv->recolor.hue; } -void zathura_renderer_enable_recolor_hue(ZathuraRenderer *renderer, - bool enable) { +void +zathura_renderer_enable_recolor_hue(ZathuraRenderer* renderer, bool enable) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); priv->recolor.hue = enable; } -bool zathura_renderer_recolor_reverse_video_enabled(ZathuraRenderer *renderer) { +bool +zathura_renderer_recolor_reverse_video_enabled(ZathuraRenderer* renderer) +{ g_return_val_if_fail(ZATHURA_IS_RENDERER(renderer), false); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); return priv->recolor.reverse_video; } -void zathura_renderer_enable_recolor_reverse_video(ZathuraRenderer *renderer, - bool enable) { +void +zathura_renderer_enable_recolor_reverse_video(ZathuraRenderer* renderer, bool enable) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); priv->recolor.reverse_video = enable; } -void zathura_renderer_set_recolor_colors(ZathuraRenderer *renderer, - const GdkRGBA *light, - const GdkRGBA *dark) { +void +zathura_renderer_set_recolor_colors(ZathuraRenderer* renderer, + const GdkRGBA* light, const GdkRGBA* dark) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); if (light != NULL) { memcpy(&priv->recolor.light, light, sizeof(GdkRGBA)); } @@ -329,9 +362,10 @@ void zathura_renderer_set_recolor_colors(ZathuraRenderer *renderer, } } -void zathura_renderer_set_recolor_colors_str(ZathuraRenderer *renderer, - const char *light, - const char *dark) { +void +zathura_renderer_set_recolor_colors_str(ZathuraRenderer* renderer, + const char* light, const char* dark) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); if (dark != NULL) { @@ -348,12 +382,13 @@ void zathura_renderer_set_recolor_colors_str(ZathuraRenderer *renderer, } } -void zathura_renderer_get_recolor_colors(ZathuraRenderer *renderer, - GdkRGBA *light, GdkRGBA *dark) { +void +zathura_renderer_get_recolor_colors(ZathuraRenderer* renderer, + GdkRGBA* light, GdkRGBA* dark) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); if (light != NULL) { memcpy(light, &priv->recolor.light, sizeof(GdkRGBA)); } @@ -362,53 +397,57 @@ void zathura_renderer_get_recolor_colors(ZathuraRenderer *renderer, } } -void zathura_renderer_lock(ZathuraRenderer *renderer) { +void +zathura_renderer_lock(ZathuraRenderer* renderer) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); g_mutex_lock(&priv->mutex); } -void zathura_renderer_unlock(ZathuraRenderer *renderer) { +void +zathura_renderer_unlock(ZathuraRenderer* renderer) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); g_mutex_unlock(&priv->mutex); } -void zathura_renderer_stop(ZathuraRenderer *renderer) { +void +zathura_renderer_stop(ZathuraRenderer* renderer) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); priv->about_to_close = true; } + /* ZathuraRenderRequest methods */ -void zathura_render_request(ZathuraRenderRequest *request, - gint64 last_view_time) { +void +zathura_render_request(ZathuraRenderRequest* request, gint64 last_view_time) +{ g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); g_mutex_lock(&request_priv->jobs_mutex); bool unfinished_jobs = false; /* check if there are any active jobs left */ - GIRARA_LIST_FOREACH_BODY( - request_priv->active_jobs, render_job_t *, job, - if (job->aborted == false) { - unfinished_jobs = true; - break; - }); + GIRARA_LIST_FOREACH_BODY(request_priv->active_jobs, render_job_t*, job, + if (job->aborted == false) { + unfinished_jobs = true; + break; + } + ); /* only add a new job if there are no active ones left */ if (unfinished_jobs == false) { request_priv->last_view_time = last_view_time; - render_job_t *job = g_try_malloc0(sizeof(render_job_t)); + render_job_t* job = g_try_malloc0(sizeof(render_job_t)); if (job == NULL) { return; } @@ -417,38 +456,41 @@ void zathura_render_request(ZathuraRenderRequest *request, job->aborted = false; girara_list_append(request_priv->active_jobs, job); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(request_priv->renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(request_priv->renderer); g_thread_pool_push(priv->pool, job, NULL); } g_mutex_unlock(&request_priv->jobs_mutex); } -void zathura_render_request_abort(ZathuraRenderRequest *request) { +void +zathura_render_request_abort(ZathuraRenderRequest* request) +{ g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); g_mutex_lock(&request_priv->jobs_mutex); - GIRARA_LIST_FOREACH_BODY(request_priv->active_jobs, render_job_t *, job, - job->aborted = true;); + GIRARA_LIST_FOREACH_BODY(request_priv->active_jobs, render_job_t*, job, + job->aborted = true; + ); g_mutex_unlock(&request_priv->jobs_mutex); } -void zathura_render_request_update_view_time(ZathuraRenderRequest *request) { +void +zathura_render_request_update_view_time(ZathuraRenderRequest* request) +{ g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); request_priv->last_view_time = g_get_real_time(); } /* render job */ -static void remove_job_and_free(render_job_t *job) { - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(job->request); +static void +remove_job_and_free(render_job_t* job) +{ + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(job->request); g_mutex_lock(&request_priv->jobs_mutex); girara_list_remove(request_priv->active_jobs, job); @@ -458,28 +500,28 @@ static void remove_job_and_free(render_job_t *job) { g_free(job); } -typedef struct emit_completed_signal_s { - render_job_t *job; - cairo_surface_t *surface; +typedef struct emit_completed_signal_s +{ + render_job_t* job; + cairo_surface_t* surface; } emit_completed_signal_t; -static gboolean emit_completed_signal(void *data) { - emit_completed_signal_t *ecs = data; - render_job_t *job = ecs->job; - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(job->request); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(request_priv->renderer); +static gboolean +emit_completed_signal(void* data) +{ + emit_completed_signal_t* ecs = data; + render_job_t* job = ecs->job; + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(job->request); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(request_priv->renderer); if (priv->about_to_close == false && job->aborted == false) { /* emit the signal */ girara_debug("Emitting signal for page %d", - zathura_page_get_index(request_priv->page) + 1); - g_signal_emit(job->request, request_signals[REQUEST_COMPLETED], 0, - ecs->surface); + zathura_page_get_index(request_priv->page) + 1); + g_signal_emit(job->request, request_signals[REQUEST_COMPLETED], 0, ecs->surface); } else { girara_debug("Rendering of page %d aborted", - zathura_page_get_index(request_priv->page) + 1); + zathura_page_get_index(request_priv->page) + 1); } /* mark the request as done */ remove_job_and_free(job); @@ -494,37 +536,37 @@ static gboolean emit_completed_signal(void *data) { /* Returns the maximum possible saturation for given h and l. Assumes that l is in the interval l1, l2 and corrects the value to force u=0 on l1 and l2 */ -static double colorumax(const double h[3], double l, double l1, double l2) { - if (fabs(h[0]) <= DBL_EPSILON && fabs(h[1]) <= DBL_EPSILON && - fabs(h[2]) <= DBL_EPSILON) { +static double +colorumax(const double h[3], double l, double l1, double l2) +{ + if (fabs(h[0]) <= DBL_EPSILON && fabs(h[1]) <= DBL_EPSILON && fabs(h[2]) <= DBL_EPSILON) { return 0; } - const double lv = - (l - l1) / (l2 - l1); /* Remap l to the whole interval [0,1] */ + const double lv = (l - l1) / (l2 - l1); /* Remap l to the whole interval [0,1] */ double u = DBL_MAX; double v = DBL_MAX; for (unsigned int k = 0; k < 3; ++k) { if (h[k] > DBL_EPSILON) { - u = fmin(fabs((1 - l) / h[k]), u); - v = fmin(fabs((1 - lv) / h[k]), v); + u = fmin(fabs((1-l)/h[k]), u); + v = fmin(fabs((1-lv)/h[k]), v); } else if (h[k] < -DBL_EPSILON) { - u = fmin(fabs(l / h[k]), u); - v = fmin(fabs(lv / h[k]), v); + u = fmin(fabs(l/h[k]), u); + v = fmin(fabs(lv/h[k]), v); } } /* rescale v according to the length of the interval [l1, l2] */ v = fabs(l2 - l1) * v; - /* forces the returned value to be 0 on l1 and l2, trying not to distort - * colors too much */ + /* forces the returned value to be 0 on l1 and l2, trying not to distort colors too much */ return fmin(u, v); } -static void recolor(ZathuraRendererPrivate *priv, zathura_page_t *page, - unsigned int page_width, unsigned int page_height, - cairo_surface_t *surface) { +static void +recolor(ZathuraRendererPrivate* priv, zathura_page_t* page, unsigned int page_width, + unsigned int page_height, cairo_surface_t* surface) +{ /* uses a representation of a rgb color as follows: - a lightness scalar (between 0,1), which is a weighted average of r, g, b, - a hue vector, which indicates a radian direction from the grey axis, @@ -541,8 +583,8 @@ static void recolor(ZathuraRendererPrivate *priv, zathura_page_t *page, cairo_surface_flush(surface); - const int rowstride = cairo_image_surface_get_stride(surface); - unsigned char *image = cairo_image_surface_get_data(surface); + const int rowstride = cairo_image_surface_get_stride(surface); + unsigned char* image = cairo_image_surface_get_data(surface); /* RGB weights for computing lightness. Must sum to one */ static const double a[] = {0.30, 0.59, 0.11}; @@ -550,37 +592,38 @@ static void recolor(ZathuraRendererPrivate *priv, zathura_page_t *page, const GdkRGBA rgb1 = priv->recolor.dark; const GdkRGBA rgb2 = priv->recolor.light; - const double l1 = a[0] * rgb1.red + a[1] * rgb1.green + a[2] * rgb1.blue; - const double l2 = a[0] * rgb2.red + a[1] * rgb2.green + a[2] * rgb2.blue; + const double l1 = a[0]*rgb1.red + a[1]*rgb1.green + a[2]*rgb1.blue; + const double l2 = a[0]*rgb2.red + a[1]*rgb2.green + a[2]*rgb2.blue; const double negalph1 = 1. - rgb1.alpha; const double negalph2 = 1. - rgb2.alpha; - const double rgb_diff[] = {rgb2.red - rgb1.red, rgb2.green - rgb1.green, - rgb2.blue - rgb1.blue}; + const double rgb_diff[] = { + rgb2.red - rgb1.red, + rgb2.green - rgb1.green, + rgb2.blue - rgb1.blue + }; const double h1[3] = { - rgb1.red * rgb1.alpha - l1, - rgb1.green * rgb1.alpha - l1, - rgb1.blue * rgb1.alpha - l1, + rgb1.red*rgb1.alpha - l1, + rgb1.green*rgb1.alpha - l1, + rgb1.blue*rgb1.alpha - l1, }; const double h2[3] = { - rgb2.red * rgb2.alpha - l2, - rgb2.green * rgb2.alpha - l2, - rgb2.blue * rgb2.alpha - l2, + rgb2.red*rgb2.alpha - l2, + rgb2.green*rgb2.alpha - l2, + rgb2.blue*rgb2.alpha - l2, }; /* Decide if we can use the older, faster formulas */ - const bool fast_formula = - (!priv->recolor.hue || (fabs(rgb1.red - rgb1.blue) < DBL_EPSILON && - fabs(rgb1.red - rgb1.green) < DBL_EPSILON && - fabs(rgb2.red - rgb2.blue) < DBL_EPSILON && - fabs(rgb2.red - rgb2.green) < DBL_EPSILON)) && - (rgb1.alpha >= 1. - DBL_EPSILON && rgb2.alpha >= 1. - DBL_EPSILON); + const bool fast_formula = (!priv->recolor.hue || ( + fabs(rgb1.red - rgb1.blue) < DBL_EPSILON && fabs(rgb1.red - rgb1.green) < DBL_EPSILON && + fabs(rgb2.red - rgb2.blue) < DBL_EPSILON && fabs(rgb2.red - rgb2.green) < DBL_EPSILON + )) && (rgb1.alpha >= 1. - DBL_EPSILON && rgb2.alpha >= 1. - DBL_EPSILON); - girara_list_t *images = NULL; - girara_list_t *rectangles = NULL; - bool found_images = false; + girara_list_t* images = NULL; + girara_list_t* rectangles = NULL; + bool found_images = false; /* If in reverse video mode retrieve images */ if (priv->recolor.reverse_video == true) { @@ -595,29 +638,31 @@ static void recolor(ZathuraRendererPrivate *priv, zathura_page_t *page, if (found_images == true) { /* Get images bounding boxes */ - GIRARA_LIST_FOREACH_BODY( - images, zathura_image_t *, image_it, - zathura_rectangle_t *rect = g_try_malloc(sizeof(zathura_rectangle_t)); - if (rect == NULL) { break; } *rect = - recalc_rectangle(page, image_it->position); - girara_list_append(rectangles, rect);); + GIRARA_LIST_FOREACH_BODY(images, zathura_image_t*, image_it, + zathura_rectangle_t* rect = g_try_malloc(sizeof(zathura_rectangle_t)); + if (rect == NULL) { + break; + } + *rect = recalc_rectangle(page, image_it->position); + girara_list_append(rectangles, rect); + ); } } for (unsigned int y = 0; y < page_height; y++) { - unsigned char *data = image + y * rowstride; + unsigned char* data = image + y * rowstride; for (unsigned int x = 0; x < page_width; x++, data += 4) { /* Check if the pixel belongs to an image when in reverse video mode*/ - if (priv->recolor.reverse_video == true && found_images == true) { + if (priv->recolor.reverse_video == true && found_images == true){ bool inside_image = false; - GIRARA_LIST_FOREACH_BODY( - rectangles, zathura_rectangle_t *, rect_it, - if (rect_it->x1 <= x && rect_it->x2 >= x && rect_it->y1 <= y && - rect_it->y2 >= y) { - inside_image = true; - break; - }); + GIRARA_LIST_FOREACH_BODY(rectangles, zathura_rectangle_t*, rect_it, + if (rect_it->x1 <= x && rect_it->x2 >= x && + rect_it->y1 <= y && rect_it->y2 >= y) { + inside_image = true; + break; + } + ); /* If it's inside and image don't recolor */ if (inside_image == true) { /* It is not guaranteed that the pixel is already opaque. */ @@ -627,15 +672,23 @@ static void recolor(ZathuraRendererPrivate *priv, zathura_page_t *page, } /* Careful. data color components blue, green, red. */ - const double rgb[3] = {data[2] / 255., data[1] / 255., data[0] / 255.}; + const double rgb[3] = { + data[2] / 255., + data[1] / 255., + data[0] / 255. + }; /* compute h, s, l data */ - double l = a[0] * rgb[0] + a[1] * rgb[1] + a[2] * rgb[2]; + double l = a[0]*rgb[0] + a[1]*rgb[1] + a[2]*rgb[2]; if (priv->recolor.hue == true) { /* adjusting lightness keeping hue of current color. white and black * go to grays of same ligtness as light and dark colors. */ - const double h[3] = {rgb[0] - l, rgb[1] - l, rgb[2] - l}; + const double h[3] = { + rgb[0] - l, + rgb[1] - l, + rgb[2] - l + }; /* u is the maximum possible saturation for given h and l. s is a * rescaled saturation between 0 and 1 */ @@ -650,45 +703,34 @@ static void recolor(ZathuraRendererPrivate *priv, zathura_page_t *page, if (fast_formula) { data[3] = 255; - data[2] = (unsigned char)round(255. * (l + su * h[0])); - data[1] = (unsigned char)round(255. * (l + su * h[1])); - data[0] = (unsigned char)round(255. * (l + su * h[2])); + data[2] = (unsigned char)round(255.*(l + su * h[0])); + data[1] = (unsigned char)round(255.*(l + su * h[1])); + data[0] = (unsigned char)round(255.*(l + su * h[2])); } else { /* Mix lightcolor, darkcolor and the original color, according to the * minimal and maximal channel of the original color */ const double tr1 = (1. - fmax(fmax(rgb[0], rgb[1]), rgb[2])); const double tr2 = fmin(fmin(rgb[0], rgb[1]), rgb[2]); - data[3] = (unsigned char)round( - 255. * (1. - tr1 * negalph1 - tr2 * negalph2)); - data[2] = (unsigned char)round( - 255. * - fmin(1, fmax(0, tr1 * h1[0] + tr2 * h2[0] + (l + su * h[0])))); - data[1] = (unsigned char)round( - 255. * - fmin(1, fmax(0, tr1 * h1[1] + tr2 * h2[1] + (l + su * h[1])))); - data[0] = (unsigned char)round( - 255. * - fmin(1, fmax(0, tr1 * h1[2] + tr2 * h2[2] + (l + su * h[2])))); + data[3] = (unsigned char)round(255.*(1. - tr1*negalph1 - tr2*negalph2)); + data[2] = (unsigned char)round(255.*fmin(1, fmax(0, tr1*h1[0] + tr2*h2[0] + (l + su * h[0])))); + data[1] = (unsigned char)round(255.*fmin(1, fmax(0, tr1*h1[1] + tr2*h2[1] + (l + su * h[1])))); + data[0] = (unsigned char)round(255.*fmin(1, fmax(0, tr1*h1[2] + tr2*h2[2] + (l + su * h[2])))); } } else { /* linear interpolation between dark and light with color ligtness as * a parameter */ if (fast_formula) { data[3] = 255; - data[2] = (unsigned char)round(255. * (l * rgb_diff[0] + rgb1.red)); - data[1] = (unsigned char)round(255. * (l * rgb_diff[1] + rgb1.green)); - data[0] = (unsigned char)round(255. * (l * rgb_diff[2] + rgb1.blue)); + data[2] = (unsigned char)round(255.*(l * rgb_diff[0] + rgb1.red)); + data[1] = (unsigned char)round(255.*(l * rgb_diff[1] + rgb1.green)); + data[0] = (unsigned char)round(255.*(l * rgb_diff[2] + rgb1.blue)); } else { - const double f1 = - 1. - (1. - fmax(fmax(rgb[0], rgb[1]), rgb[2])) * negalph1; - const double f2 = fmin(fmin(rgb[0], rgb[1]), rgb[2]) * negalph2; - data[3] = (unsigned char)round(255. * (f1 - f2)); - data[2] = (unsigned char)round( - 255. * (l * rgb_diff[0] - f2 * rgb2.red + f1 * rgb1.red)); - data[1] = (unsigned char)round( - 255. * (l * rgb_diff[1] - f2 * rgb2.green + f1 * rgb1.green)); - data[0] = (unsigned char)round( - 255. * (l * rgb_diff[2] - f2 * rgb2.blue + f1 * rgb1.blue)); + const double f1 = 1. - (1. - fmax(fmax(rgb[0], rgb[1]), rgb[2]))*negalph1; + const double f2 = fmin(fmin(rgb[0], rgb[1]), rgb[2])*negalph2; + data[3] = (unsigned char)round(255.*(f1 - f2)); + data[2] = (unsigned char)round(255.*(l * rgb_diff[0] - f2*rgb2.red + f1*rgb1.red)); + data[1] = (unsigned char)round(255.*(l * rgb_diff[1] - f2*rgb2.green + f1*rgb1.green)); + data[0] = (unsigned char)round(255.*(l * rgb_diff[2] - f2*rgb2.blue + f1*rgb1.blue)); } } } @@ -704,14 +746,15 @@ static void recolor(ZathuraRendererPrivate *priv, zathura_page_t *page, cairo_surface_mark_dirty(surface); } -static bool invoke_completed_signal(render_job_t *job, - cairo_surface_t *surface) { - emit_completed_signal_t *ecs = g_try_malloc0(sizeof(emit_completed_signal_t)); +static bool +invoke_completed_signal(render_job_t* job, cairo_surface_t* surface) +{ + emit_completed_signal_t* ecs = g_try_malloc0(sizeof(emit_completed_signal_t)); if (ecs == NULL) { return false; } - ecs->job = job; + ecs->job = job; ecs->surface = cairo_surface_reference(surface); /* emit signal from the main context, i.e. the main thread */ @@ -719,11 +762,10 @@ static bool invoke_completed_signal(render_job_t *job, return true; } -static bool render_to_cairo_surface(cairo_surface_t *surface, - zathura_page_t *page, - ZathuraRenderer *renderer, - double real_scale) { - cairo_t *cairo = cairo_create(surface); +static bool +render_to_cairo_surface(cairo_surface_t* surface, zathura_page_t* page, ZathuraRenderer* renderer, double real_scale) +{ + cairo_t* cairo = cairo_create(surface); if (cairo == NULL) { return false; } @@ -748,31 +790,30 @@ static bool render_to_cairo_surface(cairo_surface_t *surface, return err == ZATHURA_ERROR_OK; } -static bool render(render_job_t *job, ZathuraRenderRequest *request, - ZathuraRenderer *renderer) { - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(request); - zathura_page_t *page = request_priv->page; +static bool +render(render_job_t* job, ZathuraRenderRequest* request, ZathuraRenderer* renderer) +{ + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); + zathura_page_t* page = request_priv->page; /* create cairo surface */ - unsigned int page_width = 0; + unsigned int page_width = 0; unsigned int page_height = 0; /* page size in points */ - zathura_document_t *document = zathura_page_get_document(page); + zathura_document_t* document = zathura_page_get_document(page); const double height = zathura_page_get_height(page); const double width = zathura_page_get_width(page); - zathura_device_factors_t device_factors = {0}; + zathura_device_factors_t device_factors = { 0 }; double real_scale = 1; if (request_priv->render_plain == false) { /* page size in user pixels based on document zoom: if PPI information is * correct, 100% zoom will result in 72 documents points per inch of screen * (i.e. document size on screen matching the physical paper size). */ - real_scale = page_calc_height_width(document, height, width, &page_height, - &page_width, false); + real_scale = page_calc_height_width(document, height, width, + &page_height, &page_width, false); device_factors = zathura_document_get_device_factors(document); page_width *= device_factors.x; @@ -785,11 +826,12 @@ static bool render(render_job_t *job, ZathuraRenderRequest *request, cairo_format_t format; if (priv->recolor.enabled) { format = CAIRO_FORMAT_ARGB32; - } else { + } + else { format = CAIRO_FORMAT_RGB24; } - cairo_surface_t *surface = - cairo_image_surface_create(format, page_width, page_height); + cairo_surface_t* surface = cairo_image_surface_create(format, + page_width, page_height); if (surface == NULL) { return false; @@ -834,52 +876,52 @@ static bool render(render_job_t *job, ZathuraRenderRequest *request, return true; } -static void render_job(void *data, void *user_data) { - render_job_t *job = data; - ZathuraRenderRequest *request = job->request; - ZathuraRenderer *renderer = user_data; +static void +render_job(void* data, void* user_data) +{ + render_job_t* job = data; + ZathuraRenderRequest* request = job->request; + ZathuraRenderer* renderer = user_data; g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); if (priv->about_to_close == true || job->aborted == true) { /* back out early */ remove_job_and_free(job); return; } - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); girara_debug("Rendering page %d ...", - zathura_page_get_index(request_priv->page) + 1); + zathura_page_get_index(request_priv->page) + 1); if (render(job, request, renderer) != true) { girara_error("Rendering failed (page %d)\n", - zathura_page_get_index(request_priv->page) + 1); + zathura_page_get_index(request_priv->page) + 1); remove_job_and_free(job); } } -void render_all(zathura_t *zathura) { + +void +render_all(zathura_t* zathura) +{ if (zathura == NULL || zathura->document == NULL) { return; } /* unmark all pages */ - const unsigned int number_of_pages = - zathura_document_get_number_of_pages(zathura->document); + const unsigned int number_of_pages = zathura_document_get_number_of_pages(zathura->document); for (unsigned int page_id = 0; page_id < number_of_pages; ++page_id) { - zathura_page_t *page = - zathura_document_get_page(zathura->document, page_id); + zathura_page_t* page = zathura_document_get_page(zathura->document, + page_id); unsigned int page_height = 0, page_width = 0; const double height = zathura_page_get_height(page); const double width = zathura_page_get_width(page); - page_calc_height_width(zathura->document, height, width, &page_height, - &page_width, true); + page_calc_height_width(zathura->document, height, width, &page_height, &page_width, true); - girara_debug("Queuing resize for page %u to %u x %u (%0.2f x %0.2f).", - page_id, page_width, page_height, width, height); - GtkWidget *widget = zathura_page_get_widget(zathura, page); + girara_debug("Queuing resize for page %u to %u x %u (%0.2f x %0.2f).", page_id, page_width, page_height, width, height); + GtkWidget* widget = zathura_page_get_widget(zathura, page); if (widget != NULL) { gtk_widget_set_size_request(widget, page_width, page_height); gtk_widget_queue_resize(widget); @@ -887,23 +929,21 @@ void render_all(zathura_t *zathura) { } } -static gint render_thread_sort(gconstpointer a, gconstpointer b, - gpointer UNUSED(data)) { +static gint +render_thread_sort(gconstpointer a, gconstpointer b, gpointer UNUSED(data)) +{ if (a == NULL || b == NULL) { return 0; } - const render_job_t *job_a = a; - const render_job_t *job_b = b; + const render_job_t* job_a = a; + const render_job_t* job_b = b; if (job_a->aborted == job_b->aborted) { - ZathuraRenderRequestPrivate *priv_a = - zathura_render_request_get_instance_private(job_a->request); - ZathuraRenderRequestPrivate *priv_b = - zathura_render_request_get_instance_private(job_b->request); + ZathuraRenderRequestPrivate* priv_a = zathura_render_request_get_instance_private(job_a->request); + ZathuraRenderRequestPrivate* priv_b = zathura_render_request_get_instance_private(job_b->request); - return priv_a->last_view_time < priv_b->last_view_time - ? -1 - : (priv_a->last_view_time > priv_b->last_view_time ? 1 : 0); + return priv_a->last_view_time < priv_b->last_view_time ? -1 : + (priv_a->last_view_time > priv_b->last_view_time ? 1 : 0); } /* sort aborted entries earlier so that they are thrown out of the queue */ @@ -912,11 +952,11 @@ static gint render_thread_sort(gconstpointer a, gconstpointer b, /* cache functions */ -static bool page_cache_is_cached(ZathuraRenderer *renderer, - unsigned int page_index) { +static bool +page_cache_is_cached(ZathuraRenderer* renderer, unsigned int page_index) +{ g_return_val_if_fail(renderer != NULL, false); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); if (priv->page_cache.num_cached_pages != 0) { for (size_t i = 0; i < priv->page_cache.size; ++i) { @@ -932,33 +972,34 @@ static bool page_cache_is_cached(ZathuraRenderer *renderer, return false; } -static int find_request_by_page_index(const void *req, const void *data) { - ZathuraRenderRequest *request = (void *)req; - const unsigned int page_index = *((const int *)data); +static int +find_request_by_page_index(const void* req, const void* data) +{ + ZathuraRenderRequest* request = (void*) req; + const unsigned int page_index = *((const int*)data); - ZathuraRenderRequestPrivate *priv = - zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); if (zathura_page_get_index(priv->page) == page_index) { return 0; } return 1; } -static ssize_t page_cache_lru_invalidate(ZathuraRenderer *renderer) { +static ssize_t +page_cache_lru_invalidate(ZathuraRenderer* renderer) +{ g_return_val_if_fail(renderer != NULL, -1); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); g_return_val_if_fail(priv->page_cache.size != 0, -1); ssize_t lru_index = 0; gint64 lru_view_time = G_MAXINT64; - ZathuraRenderRequest *request = NULL; + ZathuraRenderRequest* request = NULL; for (size_t i = 0; i < priv->page_cache.size; ++i) { - ZathuraRenderRequest *tmp_request = girara_list_find( - priv->requests, find_request_by_page_index, &priv->page_cache.cache[i]); + ZathuraRenderRequest* tmp_request = girara_list_find(priv->requests, + find_request_by_page_index, &priv->page_cache.cache[i]); g_return_val_if_fail(tmp_request != NULL, -1); - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(tmp_request); + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(tmp_request); if (request_priv->last_view_time < lru_view_time) { lru_view_time = request_priv->last_view_time; @@ -967,49 +1008,51 @@ static ssize_t page_cache_lru_invalidate(ZathuraRenderer *renderer) { } } - ZathuraRenderRequestPrivate *request_priv = - zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate* request_priv = zathura_render_request_get_instance_private(request); /* emit the signal */ g_signal_emit(request, request_signals[REQUEST_CACHE_INVALIDATED], 0); girara_debug("Invalidated page %d at cache index %zd", - zathura_page_get_index(request_priv->page) + 1, lru_index); + zathura_page_get_index(request_priv->page) + 1, lru_index); priv->page_cache.cache[lru_index] = -1; --priv->page_cache.num_cached_pages; return lru_index; } -static bool page_cache_is_full(ZathuraRenderer *renderer, bool *result) { +static bool +page_cache_is_full(ZathuraRenderer* renderer, bool* result) +{ g_return_val_if_fail(ZATHURA_IS_RENDERER(renderer) && result != NULL, false); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); *result = priv->page_cache.num_cached_pages == priv->page_cache.size; return true; } -static void page_cache_invalidate_all(ZathuraRenderer *renderer) { +static void +page_cache_invalidate_all(ZathuraRenderer* renderer) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); for (size_t i = 0; i < priv->page_cache.size; ++i) { priv->page_cache.cache[i] = -1; } priv->page_cache.num_cached_pages = 0; } -void zathura_renderer_page_cache_add(ZathuraRenderer *renderer, - unsigned int page_index) { +void +zathura_renderer_page_cache_add(ZathuraRenderer* renderer, + unsigned int page_index) +{ g_return_if_fail(ZATHURA_IS_RENDERER(renderer)); if (page_cache_is_cached(renderer, page_index) == true) { return; } - ZathuraRendererPrivate *priv = - zathura_renderer_get_instance_private(renderer); + ZathuraRendererPrivate* priv = zathura_renderer_get_instance_private(renderer); bool full = false; if (page_cache_is_full(renderer, &full) == false) { return; @@ -1025,28 +1068,30 @@ void zathura_renderer_page_cache_add(ZathuraRenderer *renderer, } else { priv->page_cache.cache[priv->page_cache.num_cached_pages++] = page_index; girara_debug("Page %d is cached at cache index %zu", page_index + 1, - priv->page_cache.num_cached_pages - 1); + priv->page_cache.num_cached_pages - 1); } - ZathuraRenderRequest *request = - girara_list_find(priv->requests, find_request_by_page_index, &page_index); + ZathuraRenderRequest* request = girara_list_find(priv->requests, + find_request_by_page_index, &page_index); g_return_if_fail(request != NULL); g_signal_emit(request, request_signals[REQUEST_CACHE_ADDED], 0); } -void zathura_render_request_set_render_plain(ZathuraRenderRequest *request, - bool render_plain) { +void zathura_render_request_set_render_plain(ZathuraRenderRequest* request, + bool render_plain) +{ g_return_if_fail(ZATHURA_IS_RENDER_REQUEST(request)); - ZathuraRenderRequestPrivate *priv = - zathura_render_request_get_instance_private(request); - priv->render_plain = render_plain; + ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); + priv->render_plain =render_plain; } -bool zathura_render_request_get_render_plain(ZathuraRenderRequest *request) { +bool +zathura_render_request_get_render_plain(ZathuraRenderRequest* request) +{ g_return_val_if_fail(ZATHURA_IS_RENDER_REQUEST(request), false); - ZathuraRenderRequestPrivate *priv = - zathura_render_request_get_instance_private(request); + ZathuraRenderRequestPrivate* priv = zathura_render_request_get_instance_private(request); return priv->render_plain; } + From 3c438d946c80c3c5c5460d892d371cbc21c6b8ab Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Wed, 1 Dec 2021 21:07:54 +0100 Subject: [PATCH 09/12] Unifying interfaces with up-to-date upstream devel branch. Making it buildable --- zathura/commands.c | 1 + zathura/config.c | 2 -- zathura/zathura.c | 2 +- zathura/zathura.h | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/zathura/commands.c b/zathura/commands.c index d14241b..e0ddce0 100644 --- a/zathura/commands.c +++ b/zathura/commands.c @@ -519,6 +519,7 @@ error_ret: return true; } + bool cmd_exec(girara_session_t* session, girara_list_t* argument_list) { diff --git a/zathura/config.c b/zathura/config.c index 8f76a71..4467677 100644 --- a/zathura/config.c +++ b/zathura/config.c @@ -57,8 +57,6 @@ cb_color_change(girara_session_t* session, const char* name, const char* string_value = (const char*) value; if (g_strcmp0(name, "highlight-color") == 0) { parse_color(&zathura->ui.colors.highlight_color, string_value); - } else if (g_strcmp0(name, "highlight-fg") == 0) { - parse_color(&zathura->ui.colors.highlight_color_fg, string_value); } else if (g_strcmp0(name, "highlight-active-color") == 0) { parse_color(&zathura->ui.colors.highlight_color_active, string_value); } else if (g_strcmp0(name, "recolor-darkcolor") == 0) { diff --git a/zathura/zathura.c b/zathura/zathura.c index ee8ceb4..d0e89e1 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -1374,7 +1374,7 @@ document_open_synctex(zathura_t* zathura, const char* path, const char* uri, void document_open_idle(zathura_t* zathura, const char* path, const char* password, int page_number, const char* mode, const char* synctex, - const char* search_string) + const char* bookmark_name, const char *search_string) { g_return_if_fail(zathura != NULL); g_return_if_fail(path != NULL); diff --git a/zathura/zathura.h b/zathura/zathura.h index c2165a7..ea0f038 100644 --- a/zathura/zathura.h +++ b/zathura/zathura.h @@ -107,6 +107,7 @@ struct zathura_s struct { GdkRGBA highlight_color; /**< Color for highlighting */ + GdkRGBA highlight_color_fg; /**< Color for highlighting (foreground) */ GdkRGBA highlight_color_active; /** Color for highlighting */ GdkRGBA render_loading_bg; /**< Background color for render "Loading..." */ GdkRGBA render_loading_fg; /**< Foreground color for render "Loading..." */ From fab61dcce078b7a069560d2d8035310a38db4dc9 Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Mon, 10 Jan 2022 17:38:43 +0100 Subject: [PATCH 10/12] Updating last differences --- subprojects/girara.wrap | 2 +- zathura/zathura.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/subprojects/girara.wrap b/subprojects/girara.wrap index 77603b6..ebed93a 100644 --- a/subprojects/girara.wrap +++ b/subprojects/girara.wrap @@ -1,4 +1,4 @@ [wrap-git] directory=girara -url=https://github.com/pwmt/girara.git +url=https://git.pwmt.org/pwmt/girara.git revision=develop diff --git a/zathura/zathura.c b/zathura/zathura.c index d0e89e1..4084c64 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -1424,13 +1424,12 @@ document_save(zathura_t* zathura, const char* path, bool overwrite) } 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_notify(zathura->ui.session, GIRARA_ERROR, _("File already exists: %s. Use :write! to overwrite it."), file_path); g_free(file_path); return false; } - zathura_error_t error = zathura_document_save_as(zathura->document, file_path); + const zathura_error_t error = zathura_document_save_as(zathura->document, file_path); g_free(file_path); if (error != ZATHURA_ERROR_OK) { From 0dc0656a68e7729663d674ee231a2a0904a47db9 Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Mon, 10 Jan 2022 17:40:30 +0100 Subject: [PATCH 11/12] Updating gitignore file --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index d4a447f..5a2e88c 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,3 @@ compile_commands.json *.log .ycm_extra_conf.py _*/ -.ccls-cache/ From f866352ccfc37105e897bc82d2a957ab6907f065 Mon Sep 17 00:00:00 2001 From: Viktor Walter Date: Mon, 10 Jan 2022 17:44:40 +0100 Subject: [PATCH 12/12] Fixing strange whitespace difference --- zathura/plugin.c | 2 +- zathura/synctex.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zathura/plugin.c b/zathura/plugin.c index 7b3e754..0ccbac5 100644 --- a/zathura/plugin.c +++ b/zathura/plugin.c @@ -336,7 +336,7 @@ zathura_plugin_free(zathura_plugin_t* plugin) if (plugin == NULL) { return; } - + if (plugin->path != NULL) { g_free(plugin->path); } diff --git a/zathura/synctex.c b/zathura/synctex.c index 9b5d68e..fb442ed 100644 --- a/zathura/synctex.c +++ b/zathura/synctex.c @@ -204,7 +204,7 @@ synctex_rectangles_from_position(const char* filename, const char* input_file, girara_list_t* hitlist_flat = flatten_rectangles(hitlist); girara_list_free(hitlist); - + return hitlist_flat; } #else