mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:56:00 +01:00
Use the appropriate constant
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
8b701f609c
commit
7e6112d883
2 changed files with 5 additions and 5 deletions
|
@ -196,7 +196,7 @@ handle_method_call(GDBusConnection* UNUSED(connection),
|
|||
|
||||
/* methods that require an open document */
|
||||
if (g_strcmp0(method_name, "GotoPage") == 0) {
|
||||
gint page = 0;
|
||||
gint page = ZATHURA_PAGE_NUMBER_UNSPECIFIED;
|
||||
g_variant_get(parameters, "(i)", &page);
|
||||
|
||||
bool ret = true;
|
||||
|
@ -209,7 +209,7 @@ handle_method_call(GDBusConnection* UNUSED(connection),
|
|||
GVariant* result = g_variant_new("(b)", ret);
|
||||
g_dbus_method_invocation_return_value(invocation, result);
|
||||
} else if (g_strcmp0(method_name, "HighlightRects") == 0) {
|
||||
gint page = 0;
|
||||
gint page = ZATHURA_PAGE_NUMBER_UNSPECIFIED;
|
||||
GVariantIter* iter = NULL;
|
||||
g_variant_get(parameters, "(ia(dddd))", &page, &iter);
|
||||
|
||||
|
@ -369,7 +369,7 @@ zathura_dbus_synctex_position(const char* filename, const char* position)
|
|||
return false;
|
||||
}
|
||||
|
||||
int page = -1;
|
||||
int page = ZATHURA_PAGE_NUMBER_UNSPECIFIED;
|
||||
girara_list_t* rectangles = synctex_rectangles_from_position(filename, position, &page);
|
||||
if (rectangles == NULL) {
|
||||
return false;
|
||||
|
|
|
@ -147,7 +147,7 @@ synctex_rectangles_from_position(const char* filename, const char* position, int
|
|||
}
|
||||
}
|
||||
|
||||
*page = -1;
|
||||
*page = ZATHURA_PAGE_NUMBER_UNSPECIFIED;
|
||||
int current_page;
|
||||
girara_list_t* hitlist = girara_list_new2(g_free);;
|
||||
zathura_rectangle_t* rectangle = NULL;
|
||||
|
@ -167,7 +167,7 @@ synctex_rectangles_from_position(const char* filename, const char* position, int
|
|||
case SYNCTEX_PROP_PAGE:
|
||||
if (g_scanner_get_next_token(scanner) == G_TOKEN_INT) {
|
||||
current_page = g_scanner_cur_value(scanner).v_int;
|
||||
if (*page == -1) {
|
||||
if (*page == ZATHURA_PAGE_NUMBER_UNSPECIFIED) {
|
||||
*page = current_page;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue