[dev] [PATCH][EN] more patches for microblogs

Adrien souliane at mailoo.org
Jeu 13 Fév 16:20:17 CET 2014


Hi,

this should be the last changes regarding microblogs to prepare the 
version 0.4 (beside bug fixes). I will point out in this message the 
things that could have a side effect for you to double check.

Like on Monday, I separated the patches in several files, again 3 for 
libervia and 2 for sat... there are not updated versions of the previous 
files! You need to apply first the files from monday and then those 
ones, date and numerotation in the filenames should make it easy to not 
be confused in the order.

--------------------------------------------------------------------
20140213_sat_1_syntax
These are small fixes regarding the syntax conversion. Please double 
check this changeset:

plugin XEP_0277: check for XHTML namespace and decapsulate the content 
from the main div container

And especially that other one:

memory (sqlite): the result of pickle.dumps in addToHistory must be 
converted to unicode for the special characters to be stored.

Things are working but it modifies how the extra field is written in the 
history table. Without this change I was receiving an error saying 
explicitely that 8bits encoding was not enough and that we should use 
unicode. This was happening when you send a one2one message from the 
rich text editor, because the rich content is stored in the extra field 
and pickle.dumps returns a str, not a unicode.

--------------------------------------------------------------------
20140213_sat_2_wysiwyg_img
Small fix for html2text to not break the url and a method addURLToImage 
to makes the image clickable. I also added the "image" button definition
for the rich content editor.

--------------------------------------------------------------------
20140213_lib_1_mblogs_refactorization
A lot of refactorization affecting the microblogs, rich text editor
and status panel. URLs are displayed in the status. I replaced the
overwriting of __getattr__ in MicroblogEntry by some properties.
Blog titles are handled.

Most of the changes comes from the fact that MicroblogEntry is
now delegating the display/edit related stuff to the LightTextEditor
and RichTextEditor (both inherit from BaseTextEditor).

RichTextEditor does also contain a LightTextEditor which is used for
displaying the entry, and in the following patches I also use it
for the wysiwyg edition.

--------------------------------------------------------------------
20140213_lib_2_wysiwyg
A checkbox has been added in the rich text toolbar, so you can toggle
between editing by hand with your chosen syntax or wysiwyg/preview.
When you click the button, the command are applied on the selection. If
no text is selected, most (all?) of the buttons will have no effect.

--------------------------------------------------------------------
20140213_lib_3_image_width
Small fixes and set a fixed max-width property for the image within the
microblog bubble. These images are clickable (when in display mode).

That's it :)
Regards,
Adrien
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: 20140213_lib_1_mblogs_refactorization.diff
Type: text/x-diff
Taille: 62921 octets
Desc: non disponible
URL: <http://lists.goffi.org/pipermail/dev/attachments/20140213/5cbd2d5e/attachment-0005.diff>
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: 20140213_lib_2_wysiwyg.diff
Type: text/x-diff
Taille: 16486 octets
Desc: non disponible
URL: <http://lists.goffi.org/pipermail/dev/attachments/20140213/5cbd2d5e/attachment-0006.diff>
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: 20140213_lib_3_image_width.diff
Type: text/x-diff
Taille: 6573 octets
Desc: non disponible
URL: <http://lists.goffi.org/pipermail/dev/attachments/20140213/5cbd2d5e/attachment-0007.diff>
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: 20140213_sat_1_syntax.diff
Type: text/x-diff
Taille: 7195 octets
Desc: non disponible
URL: <http://lists.goffi.org/pipermail/dev/attachments/20140213/5cbd2d5e/attachment-0008.diff>
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: 20140213_sat_2_wysiwyg_img.diff
Type: text/x-diff
Taille: 9556 octets
Desc: non disponible
URL: <http://lists.goffi.org/pipermail/dev/attachments/20140213/5cbd2d5e/attachment-0009.diff>


Plus d'informations sur la liste de diffusion dev