save file info on close

This commit is contained in:
Sebastian Ramacher 2011-10-06 17:57:26 +02:00
parent 88c4dd6bbe
commit d047a36f6c

View file

@ -345,6 +345,7 @@ document_open(zathura_t* zathura, const char* path, const char* password)
float scale = 1.0f;
if (zathura_db_get_fileinfo(zathura->database, zathura->document->file_path, &page, &offset, &scale)) {
page_set_delayed(zathura, page);
zathura->document->scale = scale;
}
return true;
@ -396,6 +397,10 @@ document_close(zathura_t* zathura)
return false;
}
/* store last seen page */
zathura_db_set_fileinfo(zathura->database, zathura->document->file_path, zathura->document->current_page_number,
/* zathura->document->offset TODO */ 0, zathura->document->scale);
render_free(zathura->sync.render_thread);
zathura->sync.render_thread = NULL;