Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-23 Thread Marwan Tanager
On Sat, Mar 23, 2013 at 10:52:09AM +0100, Benoît Knecht wrote: > > > The only remaining issue I can see (but maybe you'll find others :) ) is > > > that the page number is not updated if you (say) zoom out from page 1, > > > and then zoom in (to whichever page is at the center of the screen). But

Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-23 Thread Benoît Knecht
Hi Marwan, Marwan Tanager wrote: > Sorry for being late on this. No worries, and thanks again for taking the time to review this. > On Fri, Mar 22, 2013 at 11:02:57AM +0100, Benoît Knecht wrote: > > Hi Marwan, > > > > Marwan Tanager wrote: > > > This patch eliminates the aforementioned problems

Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-22 Thread Marwan Tanager
Forget to mention that the version of the patch I've reviewd is "RFC v2" Marwan ___ zathura mailing list zathura@lists.pwmt.org http://lists.pwmt.org/mailman/listinfo/zathura

Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-22 Thread Marwan Tanager
Hi Benoît, Sorry for being late on this. On Fri, Mar 22, 2013 at 11:02:57AM +0100, Benoît Knecht wrote: > Hi Marwan, > > Marwan Tanager wrote: > > This patch eliminates the aforementioned problems by setting the adjustment > > ratio dynamically from the 'value-changed' callback only if the vert

Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-22 Thread Benoît Knecht
Hi Marwan, Marwan Tanager wrote: > This patch eliminates the aforementioned problems by setting the adjustment > ratio dynamically from the 'value-changed' callback only if the vertical > adjustment upper bound hasn't changed. If it's found to be changed, this > means > that the document scale

Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-21 Thread Marwan Tanager
This patch eliminates the aforementioned problems by setting the adjustment ratio dynamically from the 'value-changed' callback only if the vertical adjustment upper bound hasn't changed. If it's found to be changed, this means that the document scale have changed (e.g due to zooming or resizing

Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-21 Thread Marwan Tanager
On Thu, Mar 21, 2013 at 05:18:15PM +0100, Benoît Knecht wrote: > Hi Marwan, > > Thanks a lot for your review and feedback. > > Marwan Tanager wrote: > > On Wed, Mar 20, 2013 at 10:17:36PM +, Benoît Knecht wrote: > > > Instead of guesstimating the values of the scrollbars adjustments after > >

Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-21 Thread Benoît Knecht
Hi Marwan, Thanks a lot for your review and feedback. Marwan Tanager wrote: > On Wed, Mar 20, 2013 at 10:17:36PM +, Benoît Knecht wrote: > > Instead of guesstimating the values of the scrollbars adjustments after > > a change in zoom level, connect callbacks to the "changed" GtkAdjustment > >

Re: [zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-21 Thread Marwan Tanager
On Wed, Mar 20, 2013 at 10:17:36PM +, Benoît Knecht wrote: > Instead of guesstimating the values of the scrollbars adjustments after > a change in zoom level, connect callbacks to the "changed" GtkAdjustment > event (which is emitted when the bounds or page_size of the adjustment > change, e.g.

[zathura] [PATCH] Use signals to readjust_view_after_zooming()

2013-03-20 Thread Benoît Knecht
Instead of guesstimating the values of the scrollbars adjustments after a change in zoom level, connect callbacks to the "changed" GtkAdjustment event (which is emitted when the bounds or page_size of the adjustment change, e.g. when the zoom level changes), and compute the new values from there.