Commit 1fbe59aa authored by Moritz Lipp's avatar Moritz Lipp

Implemented sc_rotate

parent 4eca9796
......@@ -11,11 +11,13 @@ config_load_default(void)
if (!Zathura.UI.session)
return;
int int_value = 0;
/* general settings */
girara_mode_set(Zathura.UI.session, NORMAL);
/* zathura settings */
int int_value = 10;
int_value = 10;
girara_setting_add(Zathura.UI.session, "zoom-step", &int_value, INT, false, "Zoom step", NULL);
/* define default shortcuts */
......
......@@ -133,6 +133,16 @@ sc_reload(girara_session_t* session, girara_argument_t* argument, unsigned int t
bool
sc_rotate(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
if (session == NULL || Zathura.document == NULL) {
return false;
}
/* update rotate value */
Zathura.document->rotate = (Zathura.document->rotate + 90) % 360;
/* render all pages again */
render_all();
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment