Re: Converters: Skip Qt's loadable svg function

2014-05-10 Thread Abdelrazak Younes

On 07/05/2014 09:08, Pavel Sanda wrote:

Vincent van Ravesteijn wrote:

Now I remember why I didn't do that. We might want the Qt-automatic-way as
a fallback when no custom converter is defined.


Exactly.


If user wants to have svg he has to install something to get pdf output,
so the fallback does not look critical here.


The user might want to use LyX for HTML export... or someother tools are 
able to handle SVG? This is probably good enough for a lot of people 
that doesn't use advanced SVG tools.


Anyway, from the doc: http://qt-project.org/doc/qt-5/svgrendering.html
Qt supports the static features 
http://www.w3.org/Graphics/SVG/feature/1.2/#SVG-static of SVG 1.2 Tiny 
http://www.w3.org/TR/SVGMobile12.


By the way, it seems that Qt5 has a new QtSvg module, not sure we can or 
want to use that...


Abdel.







cmake warnings

2014-05-10 Thread Abdelrazak Younes
Hi guys,

Just checked out feature/str-metrics and I got  some warning when running
cmake:

CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run cmake --help-policy CMP0028 for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target lyx2.2 links to target Qt5::Concurrent but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target,
or
  an ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run cmake --help-policy CMP0028 for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target lyx2.2 links to target Qt5::Concurrent but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target,
or
  an ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

By the way, I just run cmake .. without any argument, is this good enough
those days?

Abdel.


Where is my menubar?

2014-05-10 Thread Abdelrazak Younes
Hi,

Just compiled a fresh str-metrics under kubuntu 14.04 (Qt4.8) and there is
no menubar. This is actually the same for Firefox but there I can press Alt
key to show it. Under Lyx, nothing... Alt+F just print 'f'...

Abdel.


Re: Where is my menubar?

2014-05-10 Thread Abdelrazak Younes
On Sat, May 10, 2014 at 6:42 PM, Abdelrazak Younes you...@lyx.org wrote:

 Hi,

 Just compiled a fresh str-metrics under kubuntu 14.04 (Qt4.8) and there is
 no menubar. This is actually the same for Firefox but there I can press Alt
 key to show it. Under Lyx, nothing... Alt+F just print 'f'...


Just for completeness. Ubuntu package 2.0.7 does not have this issue.

Abdel


Re: Where is my menubar?

2014-05-10 Thread Pavel Sanda
Abdelrazak Younes wrote:
 Just for completeness. Ubuntu package 2.0.7 does not have this issue.

I guess you use the unity crap, right? ;)
https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/619811
P


Re: Where is my menubar?

2014-05-10 Thread Abdelrazak Younes
On Sat, May 10, 2014 at 7:10 PM, Pavel Sanda sa...@lyx.org wrote:

 Abdelrazak Younes wrote:
  Just for completeness. Ubuntu package 2.0.7 does not have this issue.

 I guess you use the unity crap, right? ;)
 https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/619811


No, plain KDE. But I will try the cited workarounds in this link.

Abdel.


Re: Where is my menubar?

2014-05-10 Thread Abdelrazak Younes
On Sat, May 10, 2014 at 9:36 PM, Abdelrazak Younes you...@lyx.org wrote:

 On Sat, May 10, 2014 at 7:10 PM, Pavel Sanda sa...@lyx.org wrote:

 Abdelrazak Younes wrote:
  Just for completeness. Ubuntu package 2.0.7 does not have this issue.

 I guess you use the unity crap, right? ;)
 https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/619811


 No, plain KDE. But I will try the cited workarounds in this link.


None of these seems to work...

Abdel


Re: cmake warnings

2014-05-10 Thread Kornel Benko
Am Samstag, 10. Mai 2014 um 18:32:13, schrieb Abdelrazak Younes you...@lyx.org
 Hi guys,
 
 Just checked out feature/str-metrics and I got  some warning when running
 cmake:
 
 CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
   Policy CMP0028 is not set: Double colon in target name means ALIAS or
   IMPORTED target.  Run cmake --help-policy CMP0028 for policy details.
   Use the cmake_policy command to set the policy and suppress this warning.
 
   Target lyx2.2 links to target Qt5::Concurrent but the target was not
   found.  Perhaps a find_package() call is missing for an IMPORTED target,
 or
   an ALIAS target is missing?
 This warning is for project developers.  Use -Wno-dev to suppress it.

I don't see it. But I don't have Qt5 anyway.
Could you display the command arguments of add_executable on line 106?

message(STATUS  ${_lyx}
${WIN32_CONSOLE}
${LYX_BUILD_BUNDLE}
${lyx_sources}
${lyx_headers}
${vld_files}
${FILE_RC}
${lyx_info_files}
${lyx_cmake_files}
${OSX_BUNDLE_FILES}
)

To see, where is the colon inserted?

 
 By the way, I just run cmake .. without any argument, is this good enough
 those days?

No. But since some values will be used from cache, so it may fit.

Rebuilding with saved values should be done by
# make rebuild_cache
in the build directory.

 Abdel.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: cmake warnings

2014-05-10 Thread Abdelrazak Younes
On Sat, May 10, 2014 at 9:50 PM, Kornel Benko kor...@lyx.org wrote:

 Am Samstag, 10. Mai 2014 um 18:32:13, schrieb Abdelrazak Younes 
 you...@lyx.org
  Hi guys,
 
  Just checked out feature/str-metrics and I got  some warning when running
  cmake:
 
  CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target.  Run cmake --help-policy CMP0028 for policy details.
Use the cmake_policy command to set the policy and suppress this
 warning.
 
Target lyx2.2 links to target Qt5::Concurrent but the target was
 not
found.  Perhaps a find_package() call is missing for an IMPORTED
 target,
  or
an ALIAS target is missing?
  This warning is for project developers.  Use -Wno-dev to suppress it.

 I don't see it. But I don't have Qt5 anyway.


I use Qt4.8 but Qt5 is also installed I think but only the runtime not the
devel package.


 Could you display the command arguments of add_executable on line 106?

 message(STATUS  ${_lyx}
 ${WIN32_CONSOLE}
 ${LYX_BUILD_BUNDLE}
 ${lyx_sources}
 ${lyx_headers}
 ${vld_files}
 ${FILE_RC}
 ${lyx_info_files}
 ${lyx_cmake_files}
 ${OSX_BUNDLE_FILES}
 )

 To see, where is the colon inserted?


Here it is:

-- 

Re: Where is my menubar?

2014-05-10 Thread Pavel Sanda
Abdelrazak Younes wrote:
  No, plain KDE. But I will try the cited workarounds in this link.
 
 
 None of these seems to work...

Too bad, kubuntu  lyx 2.1 worked well, jut tried few days back. P


Re: cmake warnings

2014-05-10 Thread Kornel Benko
Am Samstag, 10. Mai 2014 um 22:26:24, schrieb Abdelrazak Younes you...@lyx.org
 On Sat, May 10, 2014 at 9:50 PM, Kornel Benko kor...@lyx.org wrote:
 
  Am Samstag, 10. Mai 2014 um 18:32:13, schrieb Abdelrazak Younes 
  you...@lyx.org
   Hi guys,
  
   Just checked out feature/str-metrics and I got  some warning when running
   cmake:
  
   CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
 Policy CMP0028 is not set: Double colon in target name means ALIAS or
 IMPORTED target.  Run cmake --help-policy CMP0028 for policy details.
 Use the cmake_policy command to set the policy and suppress this
  warning.
  
 Target lyx2.2 links to target Qt5::Concurrent but the target was
  not
 found.  Perhaps a find_package() call is missing for an IMPORTED
  target,
   or
 an ALIAS target is missing?
   This warning is for project developers.  Use -Wno-dev to suppress it.
 
  I don't see it. But I don't have Qt5 anyway.
 
 
 I use Qt4.8 but Qt5 is also installed I think but only the runtime not the
 devel package.

Maybe this is the cause of the warning
'Target lyx2.2 links to target Qt5::Concurrent',
Could you install the Qt5 devel?
Please notice that I am guessing only and cannot verify.

  Could you display the command arguments of add_executable on line 106?
 
  message(STATUS  ${_lyx}
  ${WIN32_CONSOLE}
  ${LYX_BUILD_BUNDLE}
  ${lyx_sources}
  ${lyx_headers}
  ${vld_files}
  ${FILE_RC}
  ${lyx_info_files}
  ${lyx_cmake_files}
  ${OSX_BUNDLE_FILES}
  )
 
  To see, where is the colon inserted?
 
 
 Here it is:
 

Nothing special in it. Especially no colon ':'.
Are you using new cmake ( = 3.0)?

  
   By the way, I just run cmake .. without any argument, is this good
  enough
   those days?
 
  No. But since some values will be used from cache, so it may fit.
 
 
 This was a fresh checkout, so no cache. My question was about make sure I
 don't miss important cmake definitions.

You do miss some.
LYX_CPACK, LYX_ASPELL, LYX_ENCHANT, LYX_HUNSPELL.

(If you don't use CPACK then at least use LYX_INSTALL option)

 Thanks,
 Abdel.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: Where is my menubar?

2014-05-10 Thread Kornel Benko
Am Samstag, 10. Mai 2014 um 14:13:52, schrieb Pavel Sanda sa...@lyx.org
 Abdelrazak Younes wrote:
   No, plain KDE. But I will try the cited workarounds in this link.
  
  
  None of these seems to work...
 
 Too bad, kubuntu  lyx 2.1 worked well, jut tried few days back. P

I use kubuntu too (12.10). With menu and lyx2.2.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: Fwd: clarification of structure of cursor

2014-05-10 Thread Tommaso Cucinotta
On 10/05/14 05:04, Sushant Raikar wrote:
 Hi Tommaso,

 I had sent you an email , you might have missed it!

Hi,

actually, I can't see your message below in my inbox .. strange, anyway,
if you don't get an answer from me within 24h, feel free to send it again.

 -- Forwarded message --
 From: *Sushant Raikar* sushant.s.rai...@gmail.com 
 mailto:sushant.s.rai...@gmail.com
 Date: Thu, May 8, 2014 at 11:56 PM
 Subject: clarification of structure of cursor
 To: Tommaso Cucinotta tomm...@lyx.org mailto:tomm...@lyx.org

 Did you check if my patch works?

the patch applies almost seamlessly -- I needed to add an end of line at the 
end, otherwise
patch was giving me an error.

 first of all whats the difference between cursorslice and dociterator?

a LyX buffer / document is a nested structure of a Text, made up of multiple 
Paragraph,
made up of a sequence of characters and insets. A DocIterator is a full 
absolute pointer
within this structure; it is made up of a stack of relative pointers, called 
CursorSlice.

Let me show it graphically:

Text {
  Par1 {
The lazy fox jumps on some maths: 
  InsetMathWhatever {
some stuff...
  }
   }
   Par2 {
 Second paragraph etc...
   }
}

Note that the actual text is stored in Paragraph::text_[] for text stuff, and 
within the various
inset classes for other insets. Whenever in a paragraph we add an inset (math 
stuff, floating
environment, image, table, etc.), in that position we have a special marker 
character, within
text_[] (in class Paragraph), which, instead of containing a character, 
contains the META_INSET
special value (see Paragraph::isInset()). So, if, when scanning text_[], we see 
META_INSET, it
means that in that position there's an inset. The actual Inset subclass can be 
retrieved using
Paragraph::getInset(), in which you see that insets are stored in 
Paragraph::insetlist_.
An Inset can also contain again a Text (for example a cell in a table), made up 
of paragraphs
again, etc..., recursively.

A CursorSlice provides a position within a specific inset, in terms of:
-) paragraph within the text: pit
-) position, namely which character within a paragraph: pos
-) index, namely what cell, in a multi-cell type of Inset (e.g., table or 
mathematics)

Just look at the private members of CursorSlice in CursorSlice.h:

/// pointer to 'owning' inset. This is some kind of cache.
Inset * inset_;
idx_type idx_;
/// paragraph in this cell (used by texted)
pit_type pit_;
/// position in this cell
pos_type pos_;

(see more extended comments in code)

A DocIterator, as said, is a stack of these CursorSlices:
when the cursor is within a nested inset, following the slices
allows you to go from the outer Text (bottom()most slice) to
the innsermost Inset (top()most slice)
and paragraph class and specific character where the cursor
is positioned.

Finally, a Cursor is the specific DocIterator representing your
on-screen cursor. So, you can create as many DocIterator as
you like, typically temporary, for editing purposes, in the code.
However, only a Cursor instance per BufferView / GuiWorkArea
should exist, which represents the on-screen cursor as moved
by the user.

 -
 is it possible to find difference between two cursors in every scenario, may 
 it be simple text or mathematical formula ?

Not sure what you mean by difference, but you should check:
-) are the 2 cursors in the same inset() ? Use dit1.top() == dit2.top()
-) are the 2 cursors in the same inset AND paragraph ?
   dit1.top() == dit2.top()  dit1.pit() == dit2.pit()
etc...

You can see the ::operator() to just check that a DocIterator is before 
another, but you won't know exactly whether it's before in the same innermost 
inset and paragraph, or it's in an outer inset, preceeding the point of 
insertion of nested stuff, where the 2nd iterator is, etc...

 -
 If i do manage to find the difference say manually(by subtracting pit, idx, 
 pos) and if I add the difference to the cursor will I get the original cursor 
 back..
 Cursor 1 is in front of Cursor 2
 if Cursor 1 - Cursor 2 = +X
 then is Cursor 1 = Cursor 2 +X ? in every case (considering Insets as well)?

As from above, cursors can be:
-) in same inset, then their difference may be expressed as paragraph, text and 
idx difference (which in turn becomes row() diff and col() diff for matrix-like 
grids and maths)
-) in different inset, then it's more complex; you may need to find the common 
ancestor in the nesting hierarchy, something like:

  int i1 = 0;
  int i2 = 0;
  while (docit1[i1] -inset() == docit2[i2]-inset()){
++i1;
++i2;
  }

but be sure to scan the 2 docit from bottom() (ie, outer) towards top() (ie, 
inner).

Now, you need to think of 3 cases:

a) cursors in same inset
if I add a character, and other cursor in same paragraph and after me, then 
its position needs to be shifted forward (++pos)

Re: Where is my menubar?

2014-05-10 Thread Scott Kostyshak
On Sat, May 10, 2014 at 12:42 PM, Abdelrazak Younes you...@lyx.org wrote:
 Hi,

 Just compiled a fresh str-metrics under kubuntu 14.04 (Qt4.8) and there is
 no menubar. This is actually the same for Firefox but there I can press Alt
 key to show it. Under Lyx, nothing... Alt+F just print 'f'...

I have the same problem on Ubuntu 14.04 (for both the str-metrics and
master branches).

For me, toggling fullscreen on and off fixes the problem:
lyx -x command-sequence ui-toggle fullscreen; ui-toggle fullscreen

Scott


Re: Where is my menubar?

2014-05-10 Thread Scott Kostyshak
On Sun, May 11, 2014 at 12:54 AM, Scott Kostyshak skost...@lyx.org wrote:

 For me, toggling fullscreen on and off fixes the problem:
 lyx -x command-sequence ui-toggle fullscreen; ui-toggle fullscreen

Or more simply:
lyx -x ui-toggle menubar

I guess the menu bar is not chosen correctly? Reading the comment in
Menus.cpp makes it sounds like it is tricky to get correct.

Scott


Re: Converters: Skip Qt's loadable svg function

2014-05-10 Thread Abdelrazak Younes

On 07/05/2014 09:08, Pavel Sanda wrote:

Vincent van Ravesteijn wrote:

Now I remember why I didn't do that. We might want the Qt-automatic-way as
a fallback when no custom converter is defined.


Exactly.


If user wants to have svg he has to install something to get pdf output,
so the fallback does not look critical here.


The user might want to use LyX for HTML export... or someother tools are 
able to handle SVG? This is probably good enough for a lot of people 
that doesn't use advanced SVG tools.


Anyway, from the doc: http://qt-project.org/doc/qt-5/svgrendering.html
"Qt supports the static features 
 of SVG 1.2 Tiny 
."


By the way, it seems that Qt5 has a new QtSvg module, not sure we can or 
want to use that...


Abdel.







cmake warnings

2014-05-10 Thread Abdelrazak Younes
Hi guys,

Just checked out feature/str-metrics and I got  some warning when running
cmake:

CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "lyx2.2" links to target "Qt5::Concurrent" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target,
or
  an ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "lyx2.2" links to target "Qt5::Concurrent" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target,
or
  an ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

By the way, I just run "cmake .." without any argument, is this good enough
those days?

Abdel.


Where is my menubar?

2014-05-10 Thread Abdelrazak Younes
Hi,

Just compiled a fresh str-metrics under kubuntu 14.04 (Qt4.8) and there is
no menubar. This is actually the same for Firefox but there I can press Alt
key to show it. Under Lyx, nothing... Alt+F just print 'f'...

Abdel.


Re: Where is my menubar?

2014-05-10 Thread Abdelrazak Younes
On Sat, May 10, 2014 at 6:42 PM, Abdelrazak Younes  wrote:

> Hi,
>
> Just compiled a fresh str-metrics under kubuntu 14.04 (Qt4.8) and there is
> no menubar. This is actually the same for Firefox but there I can press Alt
> key to show it. Under Lyx, nothing... Alt+F just print 'f'...
>

Just for completeness. Ubuntu package 2.0.7 does not have this issue.

Abdel


Re: Where is my menubar?

2014-05-10 Thread Pavel Sanda
Abdelrazak Younes wrote:
> Just for completeness. Ubuntu package 2.0.7 does not have this issue.

I guess you use the unity crap, right? ;)
https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/619811
P


Re: Where is my menubar?

2014-05-10 Thread Abdelrazak Younes
On Sat, May 10, 2014 at 7:10 PM, Pavel Sanda  wrote:

> Abdelrazak Younes wrote:
> > Just for completeness. Ubuntu package 2.0.7 does not have this issue.
>
> I guess you use the unity crap, right? ;)
> https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/619811
>

No, plain KDE. But I will try the cited workarounds in this link.

Abdel.


Re: Where is my menubar?

2014-05-10 Thread Abdelrazak Younes
On Sat, May 10, 2014 at 9:36 PM, Abdelrazak Younes  wrote:

> On Sat, May 10, 2014 at 7:10 PM, Pavel Sanda  wrote:
>
>> Abdelrazak Younes wrote:
>> > Just for completeness. Ubuntu package 2.0.7 does not have this issue.
>>
>> I guess you use the unity crap, right? ;)
>> https://bugs.launchpad.net/ubuntu/+source/libdbusmenu/+bug/619811
>>
>
> No, plain KDE. But I will try the cited workarounds in this link.
>

None of these seems to work...

Abdel


Re: cmake warnings

2014-05-10 Thread Kornel Benko
Am Samstag, 10. Mai 2014 um 18:32:13, schrieb Abdelrazak Younes 
> Hi guys,
> 
> Just checked out feature/str-metrics and I got  some warning when running
> cmake:
> 
> CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
>   Policy CMP0028 is not set: Double colon in target name means ALIAS or
>   IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
>   Use the cmake_policy command to set the policy and suppress this warning.
> 
>   Target "lyx2.2" links to target "Qt5::Concurrent" but the target was not
>   found.  Perhaps a find_package() call is missing for an IMPORTED target,
> or
>   an ALIAS target is missing?
> This warning is for project developers.  Use -Wno-dev to suppress it.

I don't see it. But I don't have Qt5 anyway.
Could you display the command arguments of add_executable on line 106?

message(STATUS  ${_lyx}
${WIN32_CONSOLE}
${LYX_BUILD_BUNDLE}
${lyx_sources}
${lyx_headers}
${vld_files}
${FILE_RC}
${lyx_info_files}
${lyx_cmake_files}
${OSX_BUNDLE_FILES}
)

To see, where is the colon inserted?

> 
> By the way, I just run "cmake .." without any argument, is this good enough
> those days?

No. But since some values will be used from cache, so it may fit.

Rebuilding with saved values should be done by
# make rebuild_cache
in the build directory.

> Abdel.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: cmake warnings

2014-05-10 Thread Abdelrazak Younes
On Sat, May 10, 2014 at 9:50 PM, Kornel Benko  wrote:

> Am Samstag, 10. Mai 2014 um 18:32:13, schrieb Abdelrazak Younes <
> you...@lyx.org>
> > Hi guys,
> >
> > Just checked out feature/str-metrics and I got  some warning when running
> > cmake:
> >
> > CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
> >   Policy CMP0028 is not set: Double colon in target name means ALIAS or
> >   IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
> >   Use the cmake_policy command to set the policy and suppress this
> warning.
> >
> >   Target "lyx2.2" links to target "Qt5::Concurrent" but the target was
> not
> >   found.  Perhaps a find_package() call is missing for an IMPORTED
> target,
> > or
> >   an ALIAS target is missing?
> > This warning is for project developers.  Use -Wno-dev to suppress it.
>
> I don't see it. But I don't have Qt5 anyway.
>

I use Qt4.8 but Qt5 is also installed I think but only the runtime not the
devel package.


> Could you display the command arguments of add_executable on line 106?
>
> message(STATUS  ${_lyx}
> ${WIN32_CONSOLE}
> ${LYX_BUILD_BUNDLE}
> ${lyx_sources}
> ${lyx_headers}
> ${vld_files}
> ${FILE_RC}
> ${lyx_info_files}
> ${lyx_cmake_files}
> ${OSX_BUNDLE_FILES}
> )
>
> To see, where is the colon inserted?
>

Here it is:

-- 

Re: Where is my menubar?

2014-05-10 Thread Pavel Sanda
Abdelrazak Younes wrote:
> > No, plain KDE. But I will try the cited workarounds in this link.
> >
> 
> None of these seems to work...

Too bad, kubuntu & lyx 2.1 worked well, jut tried few days back. P


Re: cmake warnings

2014-05-10 Thread Kornel Benko
Am Samstag, 10. Mai 2014 um 22:26:24, schrieb Abdelrazak Younes 
> On Sat, May 10, 2014 at 9:50 PM, Kornel Benko  wrote:
> 
> > Am Samstag, 10. Mai 2014 um 18:32:13, schrieb Abdelrazak Younes <
> > you...@lyx.org>
> > > Hi guys,
> > >
> > > Just checked out feature/str-metrics and I got  some warning when running
> > > cmake:
> > >
> > > CMake Warning (dev) at src/CMakeLists.txt:106 (add_executable):
> > >   Policy CMP0028 is not set: Double colon in target name means ALIAS or
> > >   IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
> > >   Use the cmake_policy command to set the policy and suppress this
> > warning.
> > >
> > >   Target "lyx2.2" links to target "Qt5::Concurrent" but the target was
> > not
> > >   found.  Perhaps a find_package() call is missing for an IMPORTED
> > target,
> > > or
> > >   an ALIAS target is missing?
> > > This warning is for project developers.  Use -Wno-dev to suppress it.
> >
> > I don't see it. But I don't have Qt5 anyway.
> >
> 
> I use Qt4.8 but Qt5 is also installed I think but only the runtime not the
> devel package.

Maybe this is the cause of the warning
'Target "lyx2.2" links to target "Qt5::Concurrent"',
Could you install the Qt5 devel?
Please notice that I am guessing only and cannot verify.

> > Could you display the command arguments of add_executable on line 106?
> >
> > message(STATUS  ${_lyx}
> > ${WIN32_CONSOLE}
> > ${LYX_BUILD_BUNDLE}
> > ${lyx_sources}
> > ${lyx_headers}
> > ${vld_files}
> > ${FILE_RC}
> > ${lyx_info_files}
> > ${lyx_cmake_files}
> > ${OSX_BUNDLE_FILES}
> > )
> >
> > To see, where is the colon inserted?
> >
> 
> Here it is:
> 

Nothing special in it. Especially no colon ':'.
Are you using new cmake ( >= 3.0)?

> > >
> > > By the way, I just run "cmake .." without any argument, is this good
> > enough
> > > those days?
> >
> > No. But since some values will be used from cache, so it may fit.
> >
> 
> This was a fresh checkout, so no cache. My question was about make sure I
> don't miss important cmake definitions.

You do miss some.
LYX_CPACK, LYX_ASPELL, LYX_ENCHANT, LYX_HUNSPELL.

(If you don't use CPACK then at least use LYX_INSTALL option)

> Thanks,
> Abdel.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: Where is my menubar?

2014-05-10 Thread Kornel Benko
Am Samstag, 10. Mai 2014 um 14:13:52, schrieb Pavel Sanda 
> Abdelrazak Younes wrote:
> > > No, plain KDE. But I will try the cited workarounds in this link.
> > >
> > 
> > None of these seems to work...
> 
> Too bad, kubuntu & lyx 2.1 worked well, jut tried few days back. P

I use kubuntu too (12.10). With menu and lyx2.2.

Kornel

signature.asc
Description: This is a digitally signed message part.


Re: Fwd: clarification of structure of cursor

2014-05-10 Thread Tommaso Cucinotta
On 10/05/14 05:04, Sushant Raikar wrote:
> Hi Tommaso,
>
> I had sent you an email , you might have missed it!

Hi,

actually, I can't see your message below in my inbox .. strange, anyway,
if you don't get an answer from me within 24h, feel free to send it again.

> -- Forwarded message --
> From: *Sushant Raikar*  >
> Date: Thu, May 8, 2014 at 11:56 PM
> Subject: clarification of structure of cursor
> To: Tommaso Cucinotta >
>
> Did you check if my patch works?

the patch applies almost seamlessly -- I needed to add an end of line at the 
end, otherwise
"patch" was giving me an error.
>
> first of all whats the difference between cursorslice and dociterator?

a LyX buffer / document is a nested structure of a Text, made up of multiple 
Paragraph,
made up of a sequence of characters and insets. A DocIterator is a full 
absolute pointer
within this structure; it is made up of a stack of relative pointers, called 
CursorSlice.

Let me show it graphically:

Text {
  Par1 {
"The lazy fox jumps on some maths: "
  InsetMathWhatever {
some stuff...
  }
   }
   Par2 {
 "Second paragraph etc..."
   }
}

Note that the actual text is stored in Paragraph::text_[] for text stuff, and 
within the various
inset classes for other insets. Whenever in a paragraph we add an inset (math 
stuff, floating
environment, image, table, etc.), in that position we have a special marker 
character, within
text_[] (in class Paragraph), which, instead of containing a character, 
contains the META_INSET
special value (see Paragraph::isInset()). So, if, when scanning text_[], we see 
META_INSET, it
means that in that position there's an inset. The actual Inset subclass can be 
retrieved using
Paragraph::getInset(), in which you see that insets are stored in 
Paragraph::insetlist_.
An Inset can also contain again a Text (for example a cell in a table), made up 
of paragraphs
again, etc..., recursively.

A CursorSlice provides a position within a specific inset, in terms of:
-) paragraph within the text: "pit"
-) position, namely which character within a paragraph: "pos"
-) index, namely what cell, in a multi-cell type of Inset (e.g., table or 
mathematics)

Just look at the private members of CursorSlice in CursorSlice.h:

/// pointer to 'owning' inset. This is some kind of cache.
Inset * inset_;
idx_type idx_;
/// paragraph in this cell (used by texted)
pit_type pit_;
/// position in this cell
pos_type pos_;

(see more extended comments in code)

A DocIterator, as said, is a stack of these CursorSlices:
when the cursor is within a nested inset, following the slices
allows you to go from the outer Text ("bottom()"most slice) to
the innsermost Inset ("top()"most slice)
and paragraph class and specific character where the cursor
is positioned.

Finally, a Cursor is the specific DocIterator representing your
on-screen cursor. So, you can create as many DocIterator as
you like, typically temporary, for editing purposes, in the code.
However, only a Cursor instance per BufferView / GuiWorkArea
should exist, which represents the on-screen cursor as moved
by the user.

> -
> is it possible to find difference between two cursors in every scenario, may 
> it be simple text or mathematical formula ?

Not sure what you mean by difference, but you should check:
-) are the 2 cursors in the same inset() ? Use dit1.top() == dit2.top()
-) are the 2 cursors in the same inset AND paragraph ?
   dit1.top() == dit2.top() && dit1.pit() == dit2.pit()
etc...

You can see the ::operator<() to just check that a DocIterator is before 
another, but you won't know exactly whether it's before in the same innermost 
inset and paragraph, or it's in an outer inset, preceeding the point of 
insertion of nested stuff, where the 2nd iterator is, etc...

> -
> If i do manage to find the difference say manually(by subtracting pit, idx, 
> pos) and if I add the difference to the cursor will I get the original cursor 
> back..
> Cursor 1 is in front of Cursor 2
> if Cursor 1 - Cursor 2 = +X
> then is Cursor 1 = Cursor 2 +X ? in every case (considering Insets as well)?

As from above, cursors can be:
-) in same inset, then their difference may be expressed as paragraph, text and 
idx difference (which in turn becomes row() diff and col() diff for matrix-like 
grids and maths)
-) in different inset, then it's more complex; you may need to find the common 
ancestor in the nesting hierarchy, something like:

  int i1 = 0;
  int i2 = 0;
  while (docit1[i1] ->inset() == docit2[i2]->inset()){
++i1;
++i2;
  }

but be sure to scan the 2 docit from bottom() (ie, outer) towards top() (ie, 
inner).

Now, you need to think of 3 cases:

a) cursors in same inset
if I add a character, and other cursor in same paragraph and after me, then 
its 

Re: Where is my menubar?

2014-05-10 Thread Scott Kostyshak
On Sat, May 10, 2014 at 12:42 PM, Abdelrazak Younes  wrote:
> Hi,
>
> Just compiled a fresh str-metrics under kubuntu 14.04 (Qt4.8) and there is
> no menubar. This is actually the same for Firefox but there I can press Alt
> key to show it. Under Lyx, nothing... Alt+F just print 'f'...

I have the same problem on Ubuntu 14.04 (for both the str-metrics and
master branches).

For me, toggling fullscreen on and off fixes the problem:
lyx -x "command-sequence ui-toggle fullscreen; ui-toggle fullscreen"

Scott


Re: Where is my menubar?

2014-05-10 Thread Scott Kostyshak
On Sun, May 11, 2014 at 12:54 AM, Scott Kostyshak  wrote:

> For me, toggling fullscreen on and off fixes the problem:
> lyx -x "command-sequence ui-toggle fullscreen; ui-toggle fullscreen"

Or more simply:
lyx -x "ui-toggle menubar"

I guess the menu bar is not chosen correctly? Reading the comment in
Menus.cpp makes it sounds like it is tricky to get correct.

Scott