Commit 01523526 authored by Moritz Lipp's avatar Moritz Lipp

Implemented the save function

The document gets saved to the given path.
parent 3999458f
......@@ -2325,6 +2325,15 @@ cmd_quit(int argc, char** argv)
gboolean
cmd_save(int argc, char** argv)
{
if(argc == 0 || !Zathura.PDF.document)
return TRUE;
char* path = g_strdup_printf("file://%s", argv[0]);
g_static_mutex_lock(&(Zathura.Lock.pdflib_lock));
poppler_document_save(Zathura.PDF.document, path, NULL);
g_static_mutex_unlock(&(Zathura.Lock.pdflib_lock));
g_free(path);
return TRUE;
}
......
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