mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-02-27 14:44:39 +01:00
Implemented sc_rotate
This commit is contained in:
parent
4eca979695
commit
1fbe59aabf
2 changed files with 13 additions and 1 deletions
4
config.c
4
config.c
|
@ -11,11 +11,13 @@ config_load_default(void)
|
||||||
if (!Zathura.UI.session)
|
if (!Zathura.UI.session)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
int int_value = 0;
|
||||||
|
|
||||||
/* general settings */
|
/* general settings */
|
||||||
girara_mode_set(Zathura.UI.session, NORMAL);
|
girara_mode_set(Zathura.UI.session, NORMAL);
|
||||||
|
|
||||||
/* zathura settings */
|
/* zathura settings */
|
||||||
int int_value = 10;
|
int_value = 10;
|
||||||
girara_setting_add(Zathura.UI.session, "zoom-step", &int_value, INT, false, "Zoom step", NULL);
|
girara_setting_add(Zathura.UI.session, "zoom-step", &int_value, INT, false, "Zoom step", NULL);
|
||||||
|
|
||||||
/* define default shortcuts */
|
/* define default shortcuts */
|
||||||
|
|
10
shortcuts.c
10
shortcuts.c
|
@ -133,6 +133,16 @@ sc_reload(girara_session_t* session, girara_argument_t* argument, unsigned int t
|
||||||
bool
|
bool
|
||||||
sc_rotate(girara_session_t* session, girara_argument_t* argument, unsigned int t)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue