From d882bf9cd8fabc551d2628d6c6bb955e203b35f2 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Sun, 22 Apr 2012 23:59:30 +0200 Subject: [PATCH] Enable t in sc_rotate --- shortcuts.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shortcuts.c b/shortcuts.c index 4b58223..46e8f8e 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -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 };