On 7 nov. 2010, at 00:54, Miguel de Benito Delgado wrote:

> On Sun, Nov 7, 2010 at 00:13, Gubinelli Massimiliano <[email protected]> 
> wrote:
> 1) make the file chooser dialog native. At the moment this is disabled since 
> on the mac there is a difficulty: a native  file open dialog do not allow to 
> type the file name. You have to take different actions in the case of a file 
> load or a file save and the old texmacs api didn't differentiate the two 
> possibilities. Now Joris has made some changes and when the dialog has to be 
> created we know if it is for a load or a save, so that in principle we can 
> choose the right native widget. Relevant lines in Graphics/Gui/widget.hpp are
> 
> widget file_chooser_widget (command cmd, string type, bool save);
>   // file chooser widget for files of a given 'type';
>   // for files of type "image", the widget includes a previsualizer for images
>   // 'save' indicates whether we intend to save the file
> 
> This looks easy enough, so let's say I tinker with this for a while. What 
> "coding practices" should I adhere to? I can see how you like indentation, 
> spacing and function layout, but:
> Is it ok to create a new couple of files .hpp .cpp for every class? I like it 
> that way, but I've seen that's not always the case in TM.

Personally I tend to make a new class file only if the class has several 
members and/or methods. For the moment you can do as you please, I will take 
care of porting to my style. In the future if there will be more people having 
access right to svn we should set up some policies.
> Is it ok if I correct indentation, style and typos as I review the code? Of 
> course following your preferences, which I reckon are different from mine.

It is ok to improve existing code (also by adding comments) but I would prefer 
separate patches for these "cosmetic" changes. Not to be mixed with 
"functional" modifications. I do not know if this will be easy with svn. I 
usually have different source dirs for different kind of modifications I'm 
developing on the source.

> Is it ok to add comments to the classes and methods? It's a jungle in there 
> and some markers might help others, if I get them right, that is.
Of course, see above.

> In order to have meaningful updates to the repository, I'd have to prepare 
> small patches. Do I send them to the list or to you?
Please send them to me (and eventually to Joris). You do not need zip for small 
patches.

> How is localization implemented? À la QT or otherwise?

TeXmacs performs localization for its strings, other strings which are created 
on the qt side independently of texmacs should be localized by qt (I wrote a 
translator which uses texmacs internal converter, see QTMTranslator in 
qt_gui.cpp)

best
max


> Thanks,
> ________________
> Miguel de  Benito.
> 
> 
> 
> 
> _______________________________________________
> Texmacs-dev mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/texmacs-dev

_______________________________________________
Texmacs-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to