Long time no update!
During the past days since my last post I’ve been able to solve the threading problems that I was having. Or at least that is what I think.
I was creating a thread for each background job that the application needed, like opening a file or rendering a page. This made the application too complicated, since in nearly every class I was dealing with thread code. Now I have a simpler approach: I have only one threaded function that waits jobs to be enqueued and, once a job has entered the queue, pops them out and runs them. Of course that means that only one job is in execution at once, but I have found that most jobs don’t take that long, except rendering pages.
I also have made the document classes follow the observer pattern, that way all GUI presenters can attach themselves to the document classes and wait for the document to send notify messages when the document’s states changes. This helped a lot while separating the main window’s presenter and the document page’s presenter, although the SVN version was broken a long period while doing all those changes.
Now I’m trying to implement search functionality that will use a find bar similar to firefox’s find bar. Currently I have implemented the search code in a background job that passes all the tests, but I think tomorrow I’ll have the actual find bar.
I guess that when the find bar is implemented I’ll release version 0.1.4 of ePDFView, leaving the selection options, print features and continuous mode for the next version.