Commit 859e0efa authored by Lukas K.'s avatar Lukas K.

open URLs from dbus

parent 73699b12
...@@ -213,13 +213,14 @@ handle_method_call(GDBusConnection* UNUSED(connection), ...@@ -213,13 +213,14 @@ handle_method_call(GDBusConnection* UNUSED(connection),
g_variant_get(parameters, "(ssi)", &filename, &password, &page); g_variant_get(parameters, "(ssi)", &filename, &password, &page);
document_close(priv->zathura, false); document_close(priv->zathura, false);
const bool ret = document_open(priv->zathura, filename, document_open_idle(priv->zathura, filename,
strlen(password) > 0 ? password : NULL, strlen(password) > 0 ? password : NULL,
page); page,
NULL, NULL);
g_free(filename); g_free(filename);
g_free(password); g_free(password);
GVariant* result = g_variant_new("(b)", ret); GVariant* result = g_variant_new("(b)", true);
g_dbus_method_invocation_return_value(invocation, result); g_dbus_method_invocation_return_value(invocation, result);
return; return;
} else if (g_strcmp0(method_name, "CloseDocument") == 0) { } else if (g_strcmp0(method_name, "CloseDocument") == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment