Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Jürgen Spitzmüller wrote: Andre Poenitz wrote: Is there a specific reason for the copy of the Encoding instead of using something like encodings.getFromLyXName(encoding_)->getSymbolList() ? This: GuiSymbols.cpp: In member function 'void lyx::frontend::GuiSymbols

Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Andre Poenitz wrote: Is there a specific reason for the copy of the Encoding instead of using something like encodings.getFromLyXName(encoding_)->getSymbolList() ? This: GuiSymbols.cpp: In member function 'void lyx::frontend::GuiSymbols::updateSymbolList(bool)':

Re: GuiSymbols and Encodings

2008-02-08 Thread Jürgen Spitzmüller
Andre Poenitz wrote: > Is there a specific reason for the copy of the Encoding instead > of using something like > >   encodings.getFromLyXName(encoding_)->getSymbolList() > > ? This: GuiSymbols.cpp: In member function 'void lyx::frontend::GuiSymbols::updateSymbolList(bool)': GuiSymbols.cpp:295:

Re: GuiSymbols and Encodings

2008-02-08 Thread Andre Poenitz
On Fri, Feb 08, 2008 at 04:15:42PM +0100, Jürgen Spitzmüller wrote: > Index: src/frontends/qt4/GuiSymbols.cpp > === > --- src/frontends/qt4/GuiSymbols.cpp (Revision 22860) > +++ src/frontends/qt4/GuiSymbols.cpp (Arbeitskopie) > @@ -2

Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: But the initial calculation is very long if you set encoding to utf8 (more than a minute). Yes, this is a general problem. The iconv processes are very expensive if the whole unicode range is involved (especially on Windows, apparently; here

Re: GuiSymbols and Encodings

2008-02-08 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: > > And switching from one category to another takes > > 10 seconds each time ("Display all" is unchecked). > > Better with the attached? The attached patch is significantly faster on switching. Furthermore, I tend to disable "display all" for utf8. Jürgen Index: src/fr

Re: GuiSymbols and Encodings

2008-02-08 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > But the initial calculation is very long if you set encoding to utf8 > (more than a minute). Yes, this is a general problem. The iconv processes are very expensive if the whole unicode range is involved (especially on Windows, apparently; here, it "just" takes 30 seco

Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Jürgen Spitzmüller wrote: 1. the dialog becomes slow. This is mainly because of the expensive category handling. Should be better now. We now recalculate the categories only if necessary (i.e. if the encoding changes) But the initial calculation is very long if you

Re: GuiSymbols and Encodings

2008-02-08 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: > 1. the dialog becomes slow. This is mainly because of the expensive > category handling. Should be better now. We now recalculate the categories only if necessary (i.e. if the encoding changes) > 2. lots of symbols are missing in the dialog. This is a general problem:

Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Edwin Leuven wrote: Abdelrazak Younes wrote: But if you leave the box "Display all" unchecked there is no need for much room IMO. i agree with jürgen fwiw, the box on the side is a waste of space... Well I personally like to have a global view of what's available. In the same vein I'd very

Re: GuiSymbols and Encodings

2008-02-08 Thread Edwin Leuven
Abdelrazak Younes wrote: But if you leave the box "Display all" unchecked there is no need for much room IMO. i agree with jürgen fwiw, the box on the side is a waste of space...

Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: By the way, I think I'd prefer a side list widget instead of combo at the top for the category selection. I don't. I think we need all space for the character browser. But if you leave the box "Display all" unchecked there is no need for mu

Re: GuiSymbols and Encodings

2008-02-08 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > By the way, I think I'd prefer a side list widget instead of combo at > the top for the category selection. I don't. I think we need all space for the character browser. Jürgen

Re: GuiSymbols and Encodings

2008-02-08 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > Or we could fill in all category once and for all at construction and > then filter the displayed category depending on the encoding used. I'm just working on something like this. > Yes, using a View/Model is always better than using the convenience > Widget class that

Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: To mitigate this problem I think we should only offer a view of the symbols in current category. That's what MSWord and OO Writer do AFAIK. We already have that. It doesn't help, though, since the categories need to

Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: To mitigate this problem I think we should only offer a view of the symbols in current category. That's what MSWord and OO Writer do AFAIK. We already have that. It doesn't help, though, since the categories need to be calculated nevertheless

Re: GuiSymbols and Encodings

2008-02-08 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: To mitigate this problem I think we should only offer a view of the symbols in current category. That's what MSWord and OO Writer do AFAIK. We already have that. This is new then... I guess you read my mind ;-) It doesn't help, though, sinc

Re: GuiSymbols and Encodings

2008-02-08 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > To mitigate this problem I think we should only offer a view of the > symbols in current category. That's what MSWord and OO Writer do AFAIK. We already have that. It doesn't help, though, since the categories need to be calculated nevertheless (the combo is still neede

Re: GuiSymbols and Encodings

2008-02-07 Thread Abdelrazak Younes
Abdelrazak Younes wrote: Jürgen Spitzmüller wrote: If we had access to something like python's unicodedata in C++, we could also add nice tooltips displaying the name of the glyph. Ideas welcome. Ideas in no particular order: - The information brought by QFontDatabase::writingSystem() seem

Re: GuiSymbols and Encodings

2008-02-07 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Jürgen Spitzmüller wrote: If we allowed all unicode symbols, be it in utf8 inputenc or XeTeX (which we do not support yet properly), this would ask for trouble, since neither in inputenc nor with XeTeX you can just insert any unicode char without further ado. having

Re: GuiSymbols and Encodings

2008-02-07 Thread Jürgen Spitzmüller
Jürgen Spitzmüller wrote: > If we allowed all unicode symbols, be it in utf8 inputenc or XeTeX (which > we do not support yet properly), this would ask for trouble, since neither > in inputenc nor with XeTeX you can just insert any unicode char without > further ado. having written this, there is

Re: GuiSymbols and Encodings

2008-02-07 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > Imagine that I want to use XeteX and I set the encoding to utf8, I > should be allowed to access all unicode symbols, independently of the > unicodesymbols file, which would then be unneeded, right? I don't think so. I never used XeTeX, but I think you have to declare a

Re: GuiSymbols and Encodings

2008-02-07 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: Abdelrazak Younes wrote: Juergen, It is not clear to me how I can use this dialog. My encodings is set to "Language Default" so I guess this is "latin-1". If I want to use characters not in this subset, do I have to set the document encoding to 'utf8'? Or is this langu

Re: GuiSymbols and Encodings

2008-02-07 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > Juergen, > > It is not clear to me how I can use this dialog. My encodings is set to > "Language Default" so I guess this is "latin-1". If I want to use > characters not in this subset, do I have to set the document encoding to > 'utf8'? Or is this language dependent? But