Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
1a2b195c
Commit
1a2b195c
authored
Dec 07, 2012
by
Sebastian Ramacher
Browse files
Add some comments
parent
98510e74
Changes
14
Hide whitespace changes
Inline
Side-by-side
po/cs.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/de.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/eo.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/es.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/es_CL.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/et.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/fr.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/it.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/pl.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/ru.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/ta_IN.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/tr.po
View file @
1a2b195c
...
...
@@ -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"
...
...
po/uk_UA.po
View file @
1a2b195c
...
...
@@ -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"
...
...
print.c
View file @
1a2b195c
...
...
@@ -92,13 +92,13 @@ cb_print_draw_page(GtkPrintOperation* print_operation, GtkPrintContext*
return
;
}
/*
u
pdate statusbar */
/*
U
pdate 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
);
/*
r
ender the page to the temporary surface */
/*
R
ender 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
;
}
/*
r
escale */
/*
R
escale
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment