mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-28 11:04:55 +01:00
CS
This commit is contained in:
parent
904a157f1b
commit
eb2d8ea769
2 changed files with 5 additions and 11 deletions
|
@ -60,7 +60,7 @@ file_valid_extension(zathura_t* zathura, const char* path)
|
||||||
zathura_plugin_t* plugin = zathura_plugin_manager_get_plugin(zathura->plugins.manager, content_type);
|
zathura_plugin_t* plugin = zathura_plugin_manager_get_plugin(zathura->plugins.manager, content_type);
|
||||||
g_free(content_type);
|
g_free(content_type);
|
||||||
|
|
||||||
return (plugin == NULL) ? false : true;
|
return plugin == NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -141,7 +141,6 @@ recalc_rectangle(zathura_page_t* page, zathura_rectangle_t rectangle)
|
||||||
}
|
}
|
||||||
|
|
||||||
zathura_document_t* document = zathura_page_get_document(page);
|
zathura_document_t* document = zathura_page_get_document(page);
|
||||||
|
|
||||||
if (document == NULL) {
|
if (document == NULL) {
|
||||||
goto error_ret;
|
goto error_ret;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +158,6 @@ recalc_rectangle(zathura_page_t* page, zathura_rectangle_t rectangle)
|
||||||
return tmp;
|
return tmp;
|
||||||
|
|
||||||
error_ret:
|
error_ret:
|
||||||
|
|
||||||
return rectangle;
|
return rectangle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,6 @@ typedef struct zathura_document_info_s {
|
||||||
char* search_string;
|
char* search_string;
|
||||||
} zathura_document_info_t;
|
} zathura_document_info_t;
|
||||||
|
|
||||||
|
|
||||||
static gboolean document_info_open(gpointer data);
|
static gboolean document_info_open(gpointer data);
|
||||||
|
|
||||||
#ifdef G_OS_UNIX
|
#ifdef G_OS_UNIX
|
||||||
|
@ -189,8 +188,7 @@ zathura_update_view_ppi(zathura_t* zathura)
|
||||||
/* work around apparent bug in GDK: on Wayland, monitor geometry doesn't
|
/* work around apparent bug in GDK: on Wayland, monitor geometry doesn't
|
||||||
* return values in application pixels as documented, but in device pixels.
|
* return values in application pixels as documented, but in device pixels.
|
||||||
* */
|
* */
|
||||||
if (GDK_IS_WAYLAND_DISPLAY(display))
|
if (GDK_IS_WAYLAND_DISPLAY(display)) {
|
||||||
{
|
|
||||||
/* not using the cached value for the scale factor here to avoid issues
|
/* not using the cached value for the scale factor here to avoid issues
|
||||||
* if this function is called before the cached value is updated */
|
* if this function is called before the cached value is updated */
|
||||||
const int device_factor = gtk_widget_get_scale_factor(zathura->ui.session->gtk.view);
|
const int device_factor = gtk_widget_get_scale_factor(zathura->ui.session->gtk.view);
|
||||||
|
@ -482,7 +480,7 @@ zathura_init(zathura_t* zathura)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* disable unsupported features in strict sandbox mode */
|
/* disable unsupported features in strict sandbox mode */
|
||||||
if (zathura->global.sandbox != ZATHURA_SANDBOX_STRICT){
|
if (zathura->global.sandbox != ZATHURA_SANDBOX_STRICT) {
|
||||||
/* database */
|
/* database */
|
||||||
init_database(zathura);
|
init_database(zathura);
|
||||||
}
|
}
|
||||||
|
@ -760,7 +758,6 @@ prepare_document_open_from_stdin(const char* path)
|
||||||
if (input_stream == NULL) {
|
if (input_stream == NULL) {
|
||||||
girara_error("Can not read from file descriptor.");
|
girara_error("Can not read from file descriptor.");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GFileIOStream* iostream = NULL;
|
GFileIOStream* iostream = NULL;
|
||||||
|
@ -861,8 +858,7 @@ document_info_open(gpointer data)
|
||||||
if (g_file_is_native(gf) == TRUE) {
|
if (g_file_is_native(gf) == TRUE) {
|
||||||
/* file was given as a native path */
|
/* file was given as a native path */
|
||||||
file = g_file_get_path(gf);
|
file = g_file_get_path(gf);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
/* copy file with GIO */
|
/* copy file with GIO */
|
||||||
uri = g_file_get_uri(gf);
|
uri = g_file_get_uri(gf);
|
||||||
file = prepare_document_open_from_gfile(gf);
|
file = prepare_document_open_from_gfile(gf);
|
||||||
|
|
Loading…
Reference in a new issue