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
17b49726
Commit
17b49726
authored
May 07, 2011
by
Moritz Lipp
Browse files
Update modes
parent
094acadc
Changes
3
Hide whitespace changes
Inline
Side-by-side
config.c
View file @
17b49726
...
...
@@ -17,8 +17,18 @@ config_load_default(zathura_t* zathura)
char
*
string_value
=
NULL
;
girara_session_t
*
gsession
=
zathura
->
ui
.
session
;
/* general settings */
girara_mode_set
(
gsession
,
NORMAL
);
/* mode settings */
zathura
->
modes
.
normal
=
gsession
->
modes
.
normal
;
zathura
->
modes
.
fullscreen
=
girara_mode_add
(
gsession
,
"fullscreen"
);
zathura
->
modes
.
index
=
girara_mode_add
(
gsession
,
"index"
);
zathura
->
modes
.
insert
=
girara_mode_add
(
gsession
,
"insert"
);
#define NORMAL zathura->modes.normal
#define INSERT zathura->modes.insert
#define INDEX zathura->modes.index
#define FULLSCREEN zathura->modes.fullscreen
girara_mode_set
(
gsession
,
zathura
->
modes
.
normal
);
/* zathura settings */
int_value
=
10
;
...
...
shortcuts.c
View file @
17b49726
...
...
@@ -15,7 +15,7 @@ sc_abort(girara_session_t* session, girara_argument_t* argument, unsigned int t)
{
g_return_val_if_fail
(
session
!=
NULL
,
false
);
girara_mode_set
(
session
,
NORMAL
);
girara_mode_set
(
session
,
session
->
modes
.
normal
);
return
false
;
}
...
...
zathura.h
View file @
17b49726
...
...
@@ -14,13 +14,6 @@ enum { NEXT, PREVIOUS, LEFT, RIGHT, UP, DOWN, BOTTOM, TOP, HIDE, HIGHLIGHT,
GOTO_OFFSET
,
HALF_UP
,
HALF_DOWN
,
FULL_UP
,
FULL_DOWN
,
NEXT_CHAR
,
PREVIOUS_CHAR
,
DELETE_TO_LINE_START
,
APPEND_FILEPATH
};
/* define modes */
#define ALL (1 << 0)
#define FULLSCREEN (1 << 1)
#define INDEX (1 << 2)
#define NORMAL (1 << 3)
#define INSERT (1 << 4)
/* forward declaration for types from document.h */
struct
zathura_document_s
;
struct
zathura_page_s
;
...
...
@@ -83,6 +76,14 @@ typedef struct zathura_s
bool
recolor
;
/**> Recoloring mode switch */
}
global
;
struct
{
girara_mode_t
normal
;
/**> Normal mode */
girara_mode_t
fullscreen
;
/**> Fullscreen mode */
girara_mode_t
index
;
/**> Index mode */
girara_mode_t
insert
;
/**> Insert mode */
}
modes
;
zathura_document_t
*
document
;
/**> The current document */
}
zathura_t
;
...
...
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