Re: [RFC][PATCH] native file dialogs

2018-03-21 Thread Jean-Marc Lasgouttes

Le 19/03/2018 à 17:29, Richard Kimberly Heck a écrit :

Yes, I'd guess 2.3.2. It's a reasonably big change. Presumably packagers
will have to
decide how to handle it, too.


Good, it is in 2.3.2-staging now.

JMarc


Re: [RFC][PATCH] native file dialogs

2018-03-19 Thread Richard Kimberly Heck
On 03/19/2018 11:57 AM, Jean-Marc Lasgouttes wrote:
> Le 19/03/2018 à 15:51, Jürgen Spitzmüller a écrit :
>> Am Montag, den 19.03.2018, 15:03 +0100 schrieb Jean-Marc Lasgouttes:
 I would not be opposed to a backport.
>>>
>>> As it is with native dialogs for everyone by default?
>>
>> Yes.
>
> Riki, what do you think about it? Is it 2.3.2 stuff? I guess it will
> have to be documented.

Yes, I'd guess 2.3.2. It's a reasonably big change. Presumably packagers
will have to
decide how to handle it, too.

Riki



Re: [RFC][PATCH] native file dialogs

2018-03-19 Thread Jean-Marc Lasgouttes

Le 19/03/2018 à 15:51, Jürgen Spitzmüller a écrit :

Am Montag, den 19.03.2018, 15:03 +0100 schrieb Jean-Marc Lasgouttes:

I would not be opposed to a backport.


As it is with native dialogs for everyone by default?


Yes.


Riki, what do you think about it? Is it 2.3.2 stuff? I guess it will 
have to be documented.


JMarc


Re: [RFC][PATCH] native file dialogs

2018-03-19 Thread Jürgen Spitzmüller
Am Montag, den 19.03.2018, 15:03 +0100 schrieb Jean-Marc Lasgouttes:
> > I would not be opposed to a backport.
> 
> As it is with native dialogs for everyone by default?

Yes.

Jürgen

> 
> JMarc

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


Re: [RFC][PATCH] native file dialogs

2018-03-19 Thread Jean-Marc Lasgouttes

Le 19/03/2018 à 14:40, Jürgen Spitzmüller a écrit :

Am Montag, den 19.03.2018, 11:52 +0100 schrieb Jean-Marc Lasgouttes:

It is in now.


Works here.


I am not sure what we want wrt 2.3.x.


I would not be opposed to a backport.


As it is with native dialogs for everyone by default?

JMarc


Re: [RFC][PATCH] native file dialogs

2018-03-19 Thread Jürgen Spitzmüller
Am Montag, den 19.03.2018, 11:52 +0100 schrieb Jean-Marc Lasgouttes:
> It is in now. 

Works here.

> I am not sure what we want wrt 2.3.x.

I would not be opposed to a backport.

Jürgen

> 
> JMarc

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


Re: [RFC][PATCH] native file dialogs

2018-03-19 Thread Jean-Marc Lasgouttes

Le 14/03/2018 à 12:06, Kornel Benko a écrit :

Only if it affects previous lyx-versions IMHO.
Since lyx ignores (with warning) unknown settings, it should not be needed.


It is in now. I am not sure what we want wrt 2.3.x.

JMarc


Re: [RFC][PATCH] native file dialogs

2018-03-14 Thread Kornel Benko
Am Mittwoch, 14. März 2018 11:36:24 CET schrieb Jean-Marc Lasgouttes 
:
> Le 10/03/2018 à 11:17, Kornel Benko a écrit :
> > I'd say, now is the right time to commit the proposed patch. Having
> > different defaults for linux and Mac/Windows can be done in configure.
> 
> Let's apply for master first.

+1

> A question: if I do not intend to add pref
> update code, do I have to update the LyXRC version number?
> 
> JMarc

Only if it affects previous lyx-versions IMHO.
Since lyx ignores (with warning) unknown settings, it should not be needed.

Kornel


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


Re: [RFC][PATCH] native file dialogs

2018-03-14 Thread Jean-Marc Lasgouttes

Le 10/03/2018 à 11:17, Kornel Benko a écrit :

I'd say, now is the right time to commit the proposed patch. Having different
defaults for linux and Mac/Windows can be done in configure.


Let's apply for master first. A question: if I do not intend to add pref 
update code, do I have to update the LyXRC version number?


JMarc


Re: [RFC][PATCH] native file dialogs

2018-03-10 Thread Kornel Benko
Am Donnerstag, 1. Februar 2018 08:22:30 CET schrieb Guenter Milde 
:
> On 2018-01-31, Jürgen Spitzmüller wrote:
> > Am Mittwoch, den 31.01.2018, 11:00 +0100 schrieb Jean-Marc Lasgouttes:
> >> Le 31/01/2018 à 08:20, Jürgen Spitzmüller a écrit :
> ...
> 
> >> > The nice thing about the buttons is that they only occur when it
> >> > makes
> >> > sense. And remember we do not only have "Examples". We also show
> >> > "Templates" (my favorite), "Documents", "Cliparts" (and maybe
> >> > others).
> >> > And if done correctly, it could be extended to other places
> >> > depending
> >> > on the context (e.g., "BibTeX databases" ($TEXMF/bib) in the BibTeX
> >> > dialog).
> >> 
> >> Yes, I thought about that since writing this message. Note that "New
> >> from template" already starts from the template directory.
> > 
> > Yes, I know.
> 
> OTOH, we do not have a "File>Save as template" (and I don't think we
> should add it) while "File>Save as" offers the [templates] button for
> easy creation of templates.
> 
> > The off thing is that it only includes the system
> > directory, not the user directory (not that the buttons would solve
> > that).
> 
> The examples and templates directories can be configured in
> Tools>Preferences>Paths. However if changed to the user directory, the
> system dir is "hidden". I worked around this with a symlink from my user
> templates directory to the system one.
> 
> I expect the average user to gain from creation and use of custom
> templates. Therefore I'd like to make this "dead easy".
> 
> * Set the default value for the templates to the user directory
> 
> * Either
>   - add a symlink USERDIR/templates/standard/ -> LYXDIR/templates/
> when installing LyX
>   or
>   - merge the files in userdir and lyxdir in the "new from template"
> dialogue.
> 
> I don't expect the average user to create custom examples in
> USERDIR/examples. OTOH, examples can be used as templates. Maybe we could
> also add a symlink USERDIR/templates/examples/ -> LYXDIR/examples/
> (Possibly in additon to a Help>Examples sub-menu.)
> 
> See also the discussion around
> https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg200102.html
> 
> Günter

I'd say, now is the right time to commit the proposed patch. Having different 
defaults for linux and Mac/Windows can be done in configure.

Kornel


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


Re: [RFC][PATCH] native file dialogs

2018-02-01 Thread Guenter Milde
On 2018-01-30, José Abílio Matos wrote:
> On Tuesday, 30 January 2018 14.53.45 WET Pavel Sanda wrote:

>> I use them sometimes, but can't say whether it's because of real usage or
>> devel activities... P

> Me too. :-)

So do I...

...

> One option that I thought about it sometimes is the removal of the
> native file dialogs and the placement in the Help menu of an entry that
> would allow to open the file picker for Examples. Because, at least to
> me, Examples conceptually belong to Help and not to File.

Agreed. See also https://www.lyx.org/trac/ticket/8715 and the discussion at
lyx-devel 10 months ago
https://www.mail-archive.com/search?l=mid=20170406034441.dxnerqeqj2civx3s%40steph

Günter



Re: [RFC][PATCH] native file dialogs

2018-01-31 Thread Jürgen Spitzmüller
Am Mittwoch, den 31.01.2018, 11:00 +0100 schrieb Jean-Marc Lasgouttes:
> Le 31/01/2018 à 08:20, Jürgen Spitzmüller a écrit :
> > > Or set the default to use native everywhere and let experienced
> > > people override that.
> > 
> > Yes. But then, I think, you can also drop it altogether.
> 
> Just because I propose to change the unix default? We need to have a 
> cross platform strategy. There is no real justification for the 
> different handling of the platforms.

I mean if it is only for some "experienced users", I doubt it is worth
all the maintenance hassle.

> > The nice thing about the buttons is that they only occur when it
> > makes
> > sense. And remember we do not only have "Examples". We also show
> > "Templates" (my favorite), "Documents", "Cliparts" (and maybe
> > others).
> > And if done correctly, it could be extended to other places
> > depending
> > on the context (e.g., "BibTeX databases" ($TEXMF/bib) in the BibTeX
> > dialog).
> 
> Yes, I thought about that since writing this message. Note that "New 
> from template" already starts from the template directory.

Yes, I know. The off thing is that it only includes the system
directory, not the user directory (not that the buttons would solve
that).

> Concerning clipart, I do not think that it is of much use. Most OS
> will 
> have a generic place for images.

Indeed.

> There is also the case of ui or bind files, but I think using a
> popup 
> menu there would be much more useful.

How would that look like?

> 
> > > > This would be the best solution IMHO. But do you know how to
> > > > make
> > > > setSidebarUrl work with proper entries? (I don't).
> > > 
> > > Well, first, remember that it means no native dialog.
> > 
> > Why? Doesn't the method work with native dialogs?
> 
> No: 
> https://code.woboq.org/qt5/qtbase/src/widgets/dialogs/qfiledialog.cpp
> .html#_ZN11QFileDialog14setSidebarUrlsERK5QListI4QUrlE

Too bad. Then setSidebarUrls does not guy us anything above the
buttons.

Jürgen

> 
> JMarc

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


Re: [RFC][PATCH] native file dialogs

2018-01-31 Thread Jean-Marc Lasgouttes

Le 31/01/2018 à 08:20, Jürgen Spitzmüller a écrit :

Or set the default to use native everywhere and let experienced
people override that.


Yes. But then, I think, you can also drop it altogether.


Just because I propose to change the unix default? We need to have a 
cross platform strategy. There is no real justification for the 
different handling of the platforms.



The nice thing about the buttons is that they only occur when it makes
sense. And remember we do not only have "Examples". We also show
"Templates" (my favorite), "Documents", "Cliparts" (and maybe others).
And if done correctly, it could be extended to other places depending
on the context (e.g., "BibTeX databases" ($TEXMF/bib) in the BibTeX
dialog).


Yes, I thought about that since writing this message. Note that "New 
from template" already starts from the template directory.


Concerning clipart, I do not think that it is of much use. Most OS will 
have a generic place for images.


There is also the case of ui or bind files, but I think using a popup 
menu there would be much more useful.



This would be the best solution IMHO. But do you know how to make
setSidebarUrl work with proper entries? (I don't).


Well, first, remember that it means no native dialog.


Why? Doesn't the method work with native dialogs?


No: 
https://code.woboq.org/qt5/qtbase/src/widgets/dialogs/qfiledialog.cpp.html#_ZN11QFileDialog14setSidebarUrlsERK5QListI4QUrlE


JMarc


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread Jürgen Spitzmüller
Am Dienstag, den 30.01.2018, 23:24 +0100 schrieb Jean-Marc Lasgouttes:
> Nice, so to speak. To be frank, I have no interest in reworking 20+ 
> dialogs to give them nice buttons. But this is of course desirable
> in 
> the long term.

I agree.

> > > 1/ apply this patch, maybe with a default of "false" and value
> > > "true"
> > > set in mac and windows lyxrc.dist files. This would give us the
> > > same
> > > behavior as before, but configurable
> > 
> > Would be good as a start.
> 
> Or set the default to use native everywhere and let experimented
> people 
> override that.

Yes. But then, I think, you can also drop it altogether.

> > > 3/ remove support for our custom file dialog and always use the
> > > native
> > > one (this would lose the Document/Example buttons)
> > 
> > Which would be a pity.
> 
> Why? Because of the buttons? José proposed to add an entry "Open 
> example..." in Help menu (could be in File menu too). Would that be
> enough ?

The nice thing about the buttons is that they only occur when it makes
sense. And remember we do not only have "Examples". We also show
"Templates" (my favorite), "Documents", "Cliparts" (and maybe others).
And if done correctly, it could be extended to other places depending
on the context (e.g., "BibTeX databases" ($TEXMF/bib) in the BibTeX
dialog).

> 
> Note that each OS offers a way to add your own favorite places in a
> kind 
> of sidebar.

I know, but these are static (at least on an app-level).

> > > 4/  remove support for our custom file dialog and always use the
> > > Qt
> > > custom file dialog, and try to make setSidebarUrl work, so that
> > > we
> > > have
> > > our Documents/Examples links in the side bar; this cannot work
> > > with
> > > a
> > > native file dialog.
> > 
> > This would be the best solution IMHO. But do you know how to make
> > setSidebarUrl work with proper entries? (I don't).
> 
> Well, first, remember that it means no native dialog.

Why? Doesn't the method work with native dialogs?

> Then the way to do it could be to create links to the proper
> directories 
> which have the proper names. But this is bound to fail in one way or 
> another. It is a pity that QUrl does not allow to add a text part.

Indeed.

Jürgen


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


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread Andrew Parsloe

On 31/01/2018 4:41 a.m., Jean-Marc Lasgouttes wrote:

Le 30/01/2018 à 16:33, José Abílio Matos a écrit :
One option that I thought about it sometimes is the removal of the 
native file dialogs and the placement in the Help menu of an entry 
that would allow to open the file picker for Examples. Because, at 
least to me, Examples conceptually belong to Help and not to File.


You mean _custom_ file dialogs, right?

JMarc
As a windows user, I like this idea. At present the examples are well 
hidden. To get to them needs a lot of clicking so that over a decade of 
LyX use I've hardly looked at them.


Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread Jean-Marc Lasgouttes

Le 30/01/2018 à 19:32, Jürgen Spitzmüller a écrit :

The following patch allows to select the type of file dialog at
runtime
(see ticket http://www.lyx.org/trac/ticket/11003 for why I am doing
that).


Nice.


Nice, so to speak. To be frank, I have no interest in reworking 20+ 
dialogs to give them nice buttons. But this is of course desirable in 
the long term.



1/ apply this patch, maybe with a default of "false" and value
"true"
set in mac and windows lyxrc.dist files. This would give us the same
behavior as before, but configurable


Would be good as a start.


Or set the default to use native everywhere and let experimented people 
override that.



3/ remove support for our custom file dialog and always use the
native
one (this would lose the Document/Example buttons)


Which would be a pity.


Why? Because of the buttons? José proposed to add an entry "Open 
example..." in Help menu (could be in File menu too). Would that be enough ?


Note that each OS offers a way to add your own favorite places in a kind 
of sidebar.



4/  remove support for our custom file dialog and always use the Qt
custom file dialog, and try to make setSidebarUrl work, so that we
have
our Documents/Examples links in the side bar; this cannot work with
a
native file dialog.


This would be the best solution IMHO. But do you know how to make
setSidebarUrl work with proper entries? (I don't).


Well, first, remember that it means no native dialog.

Then the way to do it could be to create links to the proper directories 
which have the proper names. But this is bound to fail in one way or 
another. It is a pity that QUrl does not allow to add a text part.




Does somebody use the custom Documents/Examples buttons? Are they
really
needed?


I don't use them anymore personally (I use the native dialog), but I
think they are quite useful. But of course they should work on all
platforms.


Indeed.

JMarc


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread Jürgen Spitzmüller
Am Dienstag, den 30.01.2018, 15:01 +0100 schrieb Jean-Marc Lasgouttes:
> Currently native file dialogs are used on windows and Mac. It is 
> possible to select them on unix with cmake, but not autoconf.
> 
> The following patch allows to select the type of file dialog at
> runtime 
> (see ticket http://www.lyx.org/trac/ticket/11003 for why I am doing
> that).

Nice.

> Currently all platforms default to true (native). Where can we go
> from 
> there? Ideas:
> 
> 1/ apply this patch, maybe with a default of "false" and value
> "true" 
> set in mac and windows lyxrc.dist files. This would give us the same 
> behavior as before, but configurable

Would be good as a start.

> 
> 2/ the same, but also add a 100th checkbox to our crowded preference 
> dialog so that people can toggle it at ease

Nah.

> 3/ remove support for our custom file dialog and always use the
> native 
> one (this would lose the Document/Example buttons)

Which would be a pity.

> 4/  remove support for our custom file dialog and always use the Qt 
> custom file dialog, and try to make setSidebarUrl work, so that we
> have 
> our Documents/Examples links in the side bar; this cannot work with
> a 
> native file dialog.

This would be the best solution IMHO. But do you know how to make
setSidebarUrl work with proper entries? (I don't).

> Does somebody use the custom Documents/Examples buttons? Are they
> really 
> needed?

I don't use them anymore personally (I use the native dialog), but I
think they are quite useful. But of course they should work on all
platforms.

Jürgen

> 
> JMarc
> 
> 

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


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread Scott Kostyshak
On Tue, Jan 30, 2018 at 02:01:54PM +, Jean-Marc Lasgouttes wrote:

> Does somebody use the custom Documents/Examples buttons? Are they really
> needed?

I use them, but the cost of forgetting that they are not available on
all platforms always comes back to bite me when I give a presentation on
LyX.

Scott


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread José Abílio Matos
On Tuesday, 30 January 2018 15.41.28 WET Jean-Marc 
Lasgouttes wrote:
> You mean _custom_ file dialogs, right?
> 
> JMarc

Sure. My mistake. :-)
-- 
José Abílio


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread Jean-Marc Lasgouttes

Le 30/01/2018 à 16:33, José Abílio Matos a écrit :
One option that I thought about it sometimes is the removal of the 
native file dialogs and the placement in the Help menu of an entry that 
would allow to open the file picker for Examples. Because, at least to 
me, Examples conceptually belong to Help and not to File.


You mean _custom_ file dialogs, right?

JMarc


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread José Abílio Matos
On Tuesday, 30 January 2018 14.53.45 WET Pavel Sanda wrote:
> I use them sometimes, but can't say whether it's because of real usage or
> devel activities... P

Me too. :-)

I think that the question regarding the usefulness of the those dialogs could 
get a 
better feedback on the users list. If not for other reason for the fact that 
most of us on 
this list are tainted.

One option that I thought about it sometimes is the removal of the native file 
dialogs 
and the placement in the Help menu of an entry that would allow to open the 
file 
picker for Examples. Because, at least to me, Examples conceptually belong to 
Help 
and not to File.

Regards,
-- 
José Abílio


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread Pavel Sanda
Jean-Marc Lasgouttes wrote:
> Does somebody use the custom Documents/Examples buttons? Are they really 
> needed?

I use them sometimes, but can't say whether it's because of real usage or
devel activities... P


Re: [RFC][PATCH] native file dialogs

2018-01-30 Thread Jean-Pierre Chrétien

Le 30/01/2018 à 15:01, Jean-Marc Lasgouttes a écrit :


Does somebody use the custom Documents/Examples buttons? Are they really needed?


I use these two quite often (more frequently examples), but my use of LyX is 
mostly for translations.


--
Jean-Pierre