mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 19:06:01 +01:00
Add some comments
This commit is contained in:
parent
98510e7420
commit
1a2b195ce9
14 changed files with 22 additions and 22 deletions
2
po/cs.po
2
po/cs.po
|
@ -4,7 +4,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-06-19 23:59+0200\n"
|
||||
"Last-Translator: Martin Pelikan <pelikan@storkhole.cz>\n"
|
||||
|
|
2
po/de.po
2
po/de.po
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-08-05 16:08+0100\n"
|
||||
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
|
||||
|
|
2
po/eo.po
2
po/eo.po
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-08-09 13:21+0000\n"
|
||||
"Last-Translator: norbux <manelsales@ono.com>\n"
|
||||
|
|
2
po/es.po
2
po/es.po
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-04-03 15:25+0000\n"
|
||||
"Last-Translator: Moritz Lipp <mlq@pwmt.org>\n"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-04-03 15:26+0000\n"
|
||||
"Last-Translator: watsh1ken <wat.sh1ken@gmail.com>\n"
|
||||
|
|
2
po/et.po
2
po/et.po
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-04-03 15:25+0000\n"
|
||||
"Last-Translator: Rivo Zängov <eraser@eraser.ee>\n"
|
||||
|
|
2
po/fr.po
2
po/fr.po
|
@ -8,7 +8,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-12-06 11:48+0100\n"
|
||||
"Last-Translator: Benoît Knecht <benoit.knecht@gmail.com>\n"
|
||||
|
|
2
po/it.po
2
po/it.po
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-06-20 14:58+0000\n"
|
||||
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
|
||||
|
|
2
po/pl.po
2
po/pl.po
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-04-03 16:07+0000\n"
|
||||
"Last-Translator: p <poczciwiec@gmail.com>\n"
|
||||
|
|
2
po/ru.po
2
po/ru.po
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-06-20 14:58+0000\n"
|
||||
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-04-03 15:25+0000\n"
|
||||
"Last-Translator: mankand007 <mankand007@gmail.com>\n"
|
||||
|
|
2
po/tr.po
2
po/tr.po
|
@ -7,7 +7,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-05-01 20:38+0000\n"
|
||||
"Last-Translator: hsngrms <dead-bodies-everywhere@hotmail.com>\n"
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: zathura\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.pwmt.org\n"
|
||||
"POT-Creation-Date: 2012-12-06 21:00+0100\n"
|
||||
"PO-Revision-Date: 2012-06-20 14:58+0000\n"
|
||||
"Last-Translator: Sebastian Ramacher <sebastian+dev@ramacher.at>\n"
|
||||
|
|
18
print.c
18
print.c
|
@ -92,13 +92,13 @@ cb_print_draw_page(GtkPrintOperation* print_operation, GtkPrintContext*
|
|||
return;
|
||||
}
|
||||
|
||||
/* update statusbar */
|
||||
/* Update statusbar. */
|
||||
char* tmp = g_strdup_printf("Printing %d...", page_number);
|
||||
girara_statusbar_item_set_text(zathura->ui.session,
|
||||
zathura->ui.statusbar.file, tmp);
|
||||
g_free(tmp);
|
||||
|
||||
/* render page */
|
||||
/* Get the page and cairo handle. */
|
||||
cairo_t* cairo = gtk_print_context_get_cairo_context(context);
|
||||
zathura_page_t* page = zathura_document_get_page(zathura->document, page_number);
|
||||
if (cairo == NULL || page == NULL) {
|
||||
|
@ -106,7 +106,8 @@ cb_print_draw_page(GtkPrintOperation* print_operation, GtkPrintContext*
|
|||
return;
|
||||
}
|
||||
|
||||
/* try to render the page with out a temporary surface */
|
||||
/* Try to render the page without a temporary surface. This only works with
|
||||
* plugins that support rendering to any surface. */
|
||||
girara_debug("printing page %d ...", page_number);
|
||||
render_lock(zathura->sync.render_thread);
|
||||
int err = zathura_page_render(page, cairo, true);
|
||||
|
@ -115,8 +116,7 @@ cb_print_draw_page(GtkPrintOperation* print_operation, GtkPrintContext*
|
|||
return;
|
||||
}
|
||||
|
||||
/* we need a temporary cairo object since the cairo object from the print
|
||||
* context doesn't have a width or height */
|
||||
/* Try to render the page on a temporary image surface. */
|
||||
const gdouble width = gtk_print_context_get_width(context);
|
||||
const gdouble height = gtk_print_context_get_height(context);
|
||||
|
||||
|
@ -135,14 +135,14 @@ cb_print_draw_page(GtkPrintOperation* print_operation, GtkPrintContext*
|
|||
return;
|
||||
}
|
||||
|
||||
/* white background */
|
||||
/* Draw a white background. */
|
||||
cairo_save(temp_cairo);
|
||||
cairo_set_source_rgb(temp_cairo, 1, 1, 1);
|
||||
cairo_rectangle(temp_cairo, 0, 0, page_width, page_height);
|
||||
cairo_fill(temp_cairo);
|
||||
cairo_restore(temp_cairo);
|
||||
|
||||
/* render the page to the temporary surface */
|
||||
/* Render the page to the temporary surface */
|
||||
girara_debug("printing page %d ...", page_number);
|
||||
render_lock(zathura->sync.render_thread);
|
||||
err = zathura_page_render(page, temp_cairo, true);
|
||||
|
@ -154,11 +154,11 @@ cb_print_draw_page(GtkPrintOperation* print_operation, GtkPrintContext*
|
|||
return;
|
||||
}
|
||||
|
||||
/* rescale */
|
||||
/* Rescale the page and keep the aspect ratio */
|
||||
const gdouble scale = MIN(width / page_width, height / page_height);
|
||||
cairo_scale(cairo, scale, scale);
|
||||
|
||||
/* copy temporary surface */
|
||||
/* Blit temporary surface to original cairo object. */
|
||||
cairo_set_source_surface(cairo, surface, 0.0, 0.0);
|
||||
cairo_paint(cairo);
|
||||
cairo_destroy(temp_cairo);
|
||||
|
|
Loading…
Reference in a new issue