mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-13 07:23:45 +01:00
Update modes
This commit is contained in:
parent
094acadcb3
commit
17b4972683
14
config.c
14
config.c
@ -17,8 +17,18 @@ config_load_default(zathura_t* zathura)
|
|||||||
char* string_value = NULL;
|
char* string_value = NULL;
|
||||||
girara_session_t* gsession = zathura->ui.session;
|
girara_session_t* gsession = zathura->ui.session;
|
||||||
|
|
||||||
/* general settings */
|
/* mode settings */
|
||||||
girara_mode_set(gsession, NORMAL);
|
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 */
|
/* zathura settings */
|
||||||
int_value = 10;
|
int_value = 10;
|
||||||
|
@ -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);
|
g_return_val_if_fail(session != NULL, false);
|
||||||
|
|
||||||
girara_mode_set(session, NORMAL);
|
girara_mode_set(session, session->modes.normal);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
15
zathura.h
15
zathura.h
@ -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,
|
GOTO_OFFSET, HALF_UP, HALF_DOWN, FULL_UP, FULL_DOWN, NEXT_CHAR, PREVIOUS_CHAR,
|
||||||
DELETE_TO_LINE_START, APPEND_FILEPATH };
|
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 */
|
/* forward declaration for types from document.h */
|
||||||
struct zathura_document_s;
|
struct zathura_document_s;
|
||||||
struct zathura_page_s;
|
struct zathura_page_s;
|
||||||
@ -83,6 +76,14 @@ typedef struct zathura_s
|
|||||||
bool recolor; /**> Recoloring mode switch */
|
bool recolor; /**> Recoloring mode switch */
|
||||||
} global;
|
} 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_document_t* document; /**> The current document */
|
||||||
} zathura_t;
|
} zathura_t;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user