[Okular-devel] Re: [patch] Revised revision toolbar

Albert Astals Cid aacid at kde.org
Sun Jan 30 23:52:50 CET 2011


A Diumenge, 30 de gener de 2011, Raffaele Mancuso va escriure:
> Hi guys,

Hi

> Actually in okular when you want to add a revision (highlight, annotation
> exc..), you have to click in the appropriate button of the revision toolbar
> and then click on the document in the point in wich you want the revision
> to be located. But then the button in the revision toolbar is de-selected
> and the revision tool detached from the mouse, so if you want to add
> another revision of the same type you have to re-click on the button in
> the toolbar.

Yep.

> 
> I have made a patch that will allow you to double click on the button in
> the toolbar. In this case, it will allow you to add revisions of the same
> type without need to re-click on the toolbar button between two revisions.
> The revision is not detached from the mouse after you  add the first.
> It is especially useful for the highlighter, when you need to highlight
> lots of almost continuous text (like when you are studying a book) and do
> not want to re-click on the button every time.
> The "one click" mode is still the same.

Very cool :-)

> 
> I have implemented it this way: the button, when double clicked, send a
> signal to the toolbar, wich send a signal to the PageViewAnnotator class,
> wich set an internal variable to true to indicate that we are in "continue
> mode" (can't get with a better name sorry :))

I think "continuous" is a better name than "continue"

> 
> I have also implemented a feature which allow to detach the tool with a
> right mouse button click.

Seems handy.

> 
> I have added a //<raffamaiden> comment in the code to easily track my
> modifications. You need to remove it if you decide to apply the patch of
> course.

Yeah, that won't stay there ;-)

> 
> Thanks to the guy who helped me compile okular in the chat :) (don't
> remember his nickname, i was raffairon)

That'd be me.

> 
> Let me know what you thinks and if the patch will be applied or not.
> Critics are very appreciated :)

You have lots of "this->" that should not be there, since "this" is already 
implied, and the indentation seems a bit off like if we use spaces and you use 
tabs or viceversa. But this all look very minor.

In general i like the patch, tomorrow i'll have a more calm look at it and 
probably commit it if i don't find anything really wrong.

Thanks for the patch :-)

Albert

> 
> Cheers,
> Raffaele


More information about the Okular-devel mailing list