Enable t in sc_rotate

This commit is contained in:
Moritz Lipp 2012-04-22 23:59:30 +02:00
parent 036dc0cd57
commit d882bf9cd8

View file

@ -444,7 +444,7 @@ sc_reload(girara_session_t* session, girara_argument_t* UNUSED(argument),
bool
sc_rotate(girara_session_t* session, girara_argument_t* argument,
girara_event_t* UNUSED(event), unsigned int UNUSED(t))
girara_event_t* UNUSED(event), unsigned int t)
{
g_return_val_if_fail(session != NULL, false);
g_return_val_if_fail(session->global.data != NULL, false);
@ -459,8 +459,9 @@ sc_rotate(girara_session_t* session, girara_argument_t* argument,
}
/* update rotate value */
t = (t == 0) ? 1 : t;
unsigned int rotation = zathura_document_get_rotation(zathura->document);
zathura_document_set_rotation(zathura->document, (rotation + angle) % 360);
zathura_document_set_rotation(zathura->document, (rotation + angle * t) % 360);
/* update scale */
girara_argument_t new_argument = { zathura_document_get_adjust_mode(zathura->document), NULL };