[RCD] Strange hook "new_messages"
thomas at roundcube.net
Mon Sep 12 22:56:26 CEST 2011
On Thu, Sep 1, 2011 at 12:35, Tilman Stremlau <tilman at stremlau.net> wrote:
> Hello there :D
> I'm a new subscriber in the dev-mailing list, my name is Tilman
> Stremlau, I'm 17 years old and I use roundcube as my main mail-client
> since I try to get away from Google Mail. So my aim is to help
> developing the project and some plugins (my fist one is html5_notifier
We're very happy to hear about your efforts to improve Roundcube and
your will to share your work with the community!
> There is a point I am not happy with:
> The implementation of the hook "new_messages". The hook is just fired,
> if a new mail arrived in the current opened mailbox.
> On my opinion is this very useless for plugins. It would be better if
> it is fired every time a new message arrives. Check if it's the current
> mailbox could be done in the plugin itself - if necessary.
> Changing the Code:
You're right with your suggestion to trigger the new_messages hook for
every folder which is checked. To submit your changes in a more
convenient way I'd like you to create a diff  file, preferably in
"unified diff" format which you then attach to a ticket on
trac.roundcube.net. That way we can schedule the changes in our
roadmap and they won't get lost.
> Another thing: The Class-File html.php
> The complete structure is not perfect. I could use html_checkbox::a();
> to create a link
It's probably not perfect but it does the job. If you have the weird
desire to abuse the checkbox subclass to create links, feel free to do
so, it won't break anything.
> and there are many unnecessary sprintf etc.
I agree that the sprintfs in attrib_string() could be replaced with
regular string concatenation. The use of sprintf in tag() is pure
programmer efficiency and makes the code easier to read and write.
> If you want, I rewrite the complete class and send it as attachment to
> you. This week I have enought time :D
If you like... we'll certainly have a look at your submission.
> All in all Roundcube is the best webclient I ever tested and I love it!
> Big admission to the developers, you did a good job!
List info: http://lists.roundcube.net/dev/
More information about the Dev