Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | 3. All applications I have seen use the session approach. Can you | think of even one that has a dialog to set initial window size? Different terminals. (so the answer is yes.) -- Lgb

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Bo Peng
Different terminals. (so the answer is yes.) OK. Although I would argue that terminal is something I would prefer a fixed window size. So, what is the verdict to my patch? Bo

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | Right, the man page says it's an xforms option, but it also works for | Qt. I agree with Lars that it would a good thing to have this both as a | preference and as a part of session handling (if possible, for all | windows/panels). | | Now, we have | 1.

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Bo Peng
| How do you plan to let them work together? If we keep --geometry then that must overrule the other settings. session could override lyxrc if the user wants it to. This is exactly my plan. --geometry has to be kept to be compatible with other applications. And, lyxrc will be used if

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | | How do you plan to let them work together? | | If we keep --geometry then that must overrule the other settings. | | session could override lyxrc if the user wants it to. | | This is exactly my plan. --geometry has to be kept to be compatible | with

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Bo Peng
Can you post your current patch? Then we can go from there. So you mean another 'slightly modified' patch? I assumed that you prefer applying the current patch, and adding subsequent patches. Anyway, I will prepare a new patch, that 1. implement all the lyxrc, session, stuff regarding windows

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | 3. All applications I have seen use the session approach. Can you | think of even one that has a dialog to set initial window size? Different terminals. (so the answer is yes.) -- Lgb

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Bo Peng
> Different terminals. > (so the answer is yes.) OK. Although I would argue that terminal is something I would prefer a fixed window size. So, what is the verdict to my patch? Bo

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > Right, the man page says it's an xforms option, but it also works for | > Qt. I agree with Lars that it would a good thing to have this both as a | > preference and as a part of session handling (if possible, for all | > windows/panels). | | Now, we have

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Bo Peng
> | How do you plan to let them work together? > > If we keep --geometry then that must overrule the other settings. > > session could override lyxrc if the user wants it to. This is exactly my plan. --geometry has to be kept to be compatible with other applications. And, lyxrc will be used if

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > | How do you plan to let them work together? | > | > If we keep --geometry then that must overrule the other settings. | > | > session could override lyxrc if the user wants it to. | | This is exactly my plan. --geometry has to be kept to be compatible |

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-28 Thread Bo Peng
> Can you post your current patch? Then we can go from there. So you mean another 'slightly modified' patch? I assumed that you prefer applying the current patch, and adding subsequent patches. Anyway, I will prepare a new patch, that 1. implement all the lyxrc, session, stuff regarding windows

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Charles de Miramon
Martin Vermeer wrote: Then how do you differentiate 'save size' close and usual close? A dialog would be needed. Also, it is perfectly normal, to me, and to all windows users, and to, I guess, most of the *nix users, to save window size every time. To test it, please fire firefox, resize it,

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Joost Verburg
Charles de Miramon wrote: Why not make things simple. I'm in favour of Bo Peng's approach. Power users can always use the -geometry option from the command line. Or if they use, KWin use the advanced options for windows placement where you can tweak parameters forever. The -geometry option

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Juergen Spitzmueller
Joost Verburg wrote: The -geometry option only works for xforms, maybe it would be a good idea to make it work for Qt as well. lyx -geometry 1280x1024 works perfectly for me (qt/linux). Jürgen

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Joost Verburg
Juergen Spitzmueller wrote: lyx -geometry 1280x1024 works perfectly for me (qt/linux). Right, the man page says it's an xforms option, but it also works for Qt. I agree with Lars that it would a good thing to have this both as a preference and as a part of session handling (if possible, for

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Bo Peng
Right, the man page says it's an xforms option, but it also works for Qt. I agree with Lars that it would a good thing to have this both as a preference and as a part of session handling (if possible, for all windows/panels). Now, we have 1. lyx --geometry 2. lyxrc 3. session() How do you

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Joost Verburg
Bo Peng wrote: Now, we have 1. lyx --geometry 2. lyxrc 3. session() How do you plan to let them work together? In my opinion sessions are the most important thing. It would however also be nice if you could set a static session for window sizes. That is, have a standard set of window

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Bo Peng
In my opinion sessions are the most important thing. It would however also be nice if you could set a static session for window sizes. That is, have a standard set of window positions that will be loaded at This makes sense. I propose a lyxrc entry windowSize that 1. has value (0,0) by

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Joost Verburg
Bo Peng wrote: This makes sense. I propose a lyxrc entry windowSize that 1. has value (0,0) by default. 2. If lyxrc.windowSize==(0,0), saved window size from session() will be used. (If no session() info, use hard-coded default) 3. if lyxrc.windowSize != (0,0) (being assigned a value using a

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Bo Peng
That's exactly what I mean. With Hammer's my patches, it is not difficult to achieve all these. I will submit a patch later. (Lars already complained about my frequent and almost repetitive patches, so I'd better wait for him to catch up.) Cheers, Bo

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Enrico Forestieri
On Mon, Mar 27, 2006 at 04:25:58PM +0200, Joost Verburg wrote: Charles de Miramon wrote: Why not make things simple. I'm in favour of Bo Peng's approach. Power users can always use the -geometry option from the command line. Or if they use, KWin use the advanced options for windows

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Charles de Miramon
Martin Vermeer wrote: >> Then how do you differentiate 'save size' close and usual close? A >> dialog would be needed. Also, it is perfectly normal, to me, and to >> all windows users, and to, I guess, most of the *nix users, to save >> window size every time. To test it, please fire firefox,

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Joost Verburg
Charles de Miramon wrote: Why not make things simple. I'm in favour of Bo Peng's approach. Power users can always use the -geometry option from the command line. Or if they use, KWin use the advanced options for windows placement where you can tweak parameters forever. The -geometry option

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Juergen Spitzmueller
Joost Verburg wrote: > The -geometry option only works for xforms, maybe it would be a good > idea to make it work for Qt as well. lyx -geometry 1280x1024 works perfectly for me (qt/linux). Jürgen

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Joost Verburg
Juergen Spitzmueller wrote: lyx -geometry 1280x1024 works perfectly for me (qt/linux). Right, the man page says it's an xforms option, but it also works for Qt. I agree with Lars that it would a good thing to have this both as a preference and as a part of session handling (if possible, for

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Bo Peng
> Right, the man page says it's an xforms option, but it also works for > Qt. I agree with Lars that it would a good thing to have this both as a > preference and as a part of session handling (if possible, for all > windows/panels). Now, we have 1. lyx --geometry 2. lyxrc 3. session() How do

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Joost Verburg
Bo Peng wrote: Now, we have 1. lyx --geometry 2. lyxrc 3. session() How do you plan to let them work together? In my opinion sessions are the most important thing. It would however also be nice if you could set a "static session" for window sizes. That is, have a standard set of window

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Bo Peng
> In my opinion sessions are the most important thing. It would however > also be nice if you could set a "static session" for window sizes. That > is, have a standard set of window positions that will be loaded at This makes sense. I propose a lyxrc entry windowSize that 1. has value (0,0) by

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Joost Verburg
Bo Peng wrote: This makes sense. I propose a lyxrc entry windowSize that 1. has value (0,0) by default. 2. If lyxrc.windowSize==(0,0), saved window size from session() will be used. (If no session() info, use hard-coded default) 3. if lyxrc.windowSize != (0,0) (being assigned a value using a

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Bo Peng
> That's exactly what I mean. With Hammer's my patches, it is not difficult to achieve all these. I will submit a patch later. (Lars already complained about my frequent and almost repetitive patches, so I'd better wait for him to catch up.) Cheers, Bo

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-27 Thread Enrico Forestieri
On Mon, Mar 27, 2006 at 04:25:58PM +0200, Joost Verburg wrote: > Charles de Miramon wrote: > > Why not make things simple. I'm in favour of Bo Peng's approach. Power users > > can always use the -geometry option from the command line. Or if they use, > > KWin use the advanced options for windows

[Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Hammer Armin
Hi Bo, i've hacked the get/set function for the qt frontend on macosx some time ago. Perhaps you can clean it up. lyx_gui.diff : qt frontend code to get/set the window size and position lyxrc_C.diff, lyxfunc.diff, lyxrc_h.diff : to save/retrieve the infos from the Lyx Settings file. The patches

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
i've hacked the get/set function for the qt frontend on macosx some time ago. Perhaps you can clean it up. But the maintainers do not seem to like this feature. If Lars says yes, and prove on the rc options, I will clean the patch and submit to him. Thanks. Bo

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | i've hacked the get/set function for the qt frontend on macosx some time | ago. Perhaps you can clean it up. | | But the maintainers do not seem to like this feature. If Lars says | yes, and prove on the rc options, I will clean the patch and submit to |

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
Can we go for just width and height as a first? Both Hammer and my patches can do this. So you need to decide which approach you like better. Hammer uses lyxrc.write() to save these info as user preferences, and I use session::saveMiscInfo() to save them as session info. I would definitely vote

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Georg Baum
Am Sonntag, 26. März 2006 19:40 schrieb Bo Peng: I would definitely vote for my approach since the keyword/value interface of session() allows saving of arbitrary information easily. I agree. For example, if we decide to save toolbar status, windows position later, we only need to use

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
I share Lars' concerns about the misc section. Is it not possible to do without one? For example, is the frontend related information really different on different frontends? The lyxrc approach saves/loads such info for all frontends, but that is difficult to do. For example, xform may not be

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | Can we go for just width and height as a first? | | Both Hammer and my patches can do this. So you need to decide which | approach you like better. Hammer uses lyxrc.write() to save these info | as user preferences, and I use session::saveMiscInfo() to save

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
Isn't there a difference here... With the info in lyxrc it becomes the default geometry, with the info in session is is last session geometry. His patch saves lyxrc every time when lyx exits. So, it is session info, disguised as preference. I think I want to be able to set the size of the

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Georg Baum
Am Sonntag, 26. März 2006 20:01 schrieb Bo Peng: The lyxrc approach saves/loads such info for all frontends, but that is difficult to do. For example, xform may not be able to implement floating toolbars so toolbar positions are useless to it. Then it would simply ignore toolbar positions,

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
They could still be stored in a section [toolbar] or more general [geometry]. It is tempting to have sections like this, and even for each frontend (who would run lyx with different frontends anyway?). But right now, [session info] or [frontend] should be enough for the two entries we have

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | Isn't there a difference here... With the info in lyxrc it becomes the | default geometry, with the info in session is is last session | geometry. | | His patch saves lyxrc every time when lyx exits. So, it is session | info, disguised as preference. Ok,

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
Ok, so we add it to preference... does not save on exit + your session patch and we have both features? It is ok to have both but I really do not see the need. If windows size is made persistent, which value should be used when both of them (session().loadSessionValue() and lyxrc.windowsSize)

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Lars Gullik Bjønnes
Bo Peng [EMAIL PROTECTED] writes: | Ok, so we add it to preference... does not save on exit + your session | patch and we have both features? | | It is ok to have both but I really do not see the need. If windows | size is made persistent, which value should be used when both of them |

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
I do realize that width/height falls a bit in both categories. 1. Which way is easier save window size? Go to a dialog to set value or do nothing? 2. If both features are used. lyxrc.windowSize will be used only once. I.e., when no session info exists yet. 3. All applications I have seen use

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Martin Vermeer
On Sun, Mar 26, 2006 at 06:10:50PM -0600, Bo Peng wrote: I do realize that width/height falls a bit in both categories. 1. Which way is easier save window size? Go to a dialog to set value or do nothing? No dialog. Take the current window size and save it when the save button is pressed.

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
No dialog. Take the current window size and save it when the save button is pressed. You said later that you want to save it only once Yet, I must agree with Lars here. Window size is a save once thing. Once you have found the right size, it is wrong to save it every time again when you

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Martin Vermeer
On Sun, 2006-03-26 at 23:15 -0600, Bo Peng wrote: No dialog. Take the current window size and save it when the save button is pressed. You said later that you want to save it only once Yes. I meant the save button in the preferences dialog. It is (and can be) only pressed when

[Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Hammer Armin
Hi Bo, i've hacked the get/set function for the qt frontend on macosx some time ago. Perhaps you can clean it up. lyx_gui.diff : qt frontend code to get/set the window size and position lyxrc_C.diff, lyxfunc.diff, lyxrc_h.diff : to save/retrieve the infos from the Lyx Settings file. The patches

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> i've hacked the get/set function for the qt frontend on macosx some time > ago. Perhaps you can clean it up. But the maintainers do not seem to like this feature. If Lars says yes, and prove on the rc options, I will clean the patch and submit to him. Thanks. Bo

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > i've hacked the get/set function for the qt frontend on macosx some time | > ago. Perhaps you can clean it up. | | But the maintainers do not seem to like this feature. If Lars says | yes, and prove on the rc options, I will clean the patch and submit to

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> Can we go for just width and height as a first? Both Hammer and my patches can do this. So you need to decide which approach you like better. Hammer uses lyxrc.write() to save these info as user preferences, and I use session::saveMiscInfo() to save them as session info. I would definitely

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Georg Baum
Am Sonntag, 26. März 2006 19:40 schrieb Bo Peng: > I would definitely vote for my approach since the keyword/value > interface of session() allows saving of arbitrary information easily. I agree. > For example, if we decide to save toolbar status, windows position > later, we only need to use

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> I share Lars' concerns about the misc section. Is it not possible to do > without one? For example, is the frontend related information really > different on different frontends? The lyxrc approach saves/loads such info for all frontends, but that is difficult to do. For example, xform may not

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > Can we go for just width and height as a first? | | Both Hammer and my patches can do this. So you need to decide which | approach you like better. Hammer uses lyxrc.write() to save these info | as user preferences, and I use session::saveMiscInfo() to

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> Isn't there a difference here... With the info in lyxrc it becomes the > "default geometry", with the info in session is is "last session > geometry". His patch saves lyxrc every time when lyx exits. So, it is session info, disguised as preference. > I think I want to be able to set the size

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Georg Baum
Am Sonntag, 26. März 2006 20:01 schrieb Bo Peng: > The lyxrc approach saves/loads such info for all frontends, but that > is difficult to do. For example, xform may not be able to implement > floating toolbars so toolbar positions are useless to it. Then it would simply ignore toolbar positions,

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> They could still be stored in a section [toolbar] or > more general [geometry]. It is tempting to have sections like this, and even for each frontend (who would run lyx with different frontends anyway?). But right now, [session info] or [frontend] should be enough for the two entries we have

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > Isn't there a difference here... With the info in lyxrc it becomes the | > "default geometry", with the info in session is is "last session | > geometry". | | His patch saves lyxrc every time when lyx exits. So, it is session | info, disguised as

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> Ok, so we add it to preference... does not save on exit + your session > patch and we have both features? It is ok to have both but I really do not see the need. If windows size is made persistent, which value should be used when both of them (session().loadSessionValue() and lyxrc.windowsSize)

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes: | > Ok, so we add it to preference... does not save on exit + your session | > patch and we have both features? | | It is ok to have both but I really do not see the need. If windows | size is made persistent, which value should be used when both of them |

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> I do realize that width/height falls a bit in both categories. 1. Which way is easier save window size? Go to a dialog to set value or do nothing? 2. If both features are used. lyxrc.windowSize will be used only once. I.e., when no session info exists yet. 3. All applications I have seen use

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Martin Vermeer
On Sun, Mar 26, 2006 at 06:10:50PM -0600, Bo Peng wrote: > > I do realize that width/height falls a bit in both categories. > > 1. Which way is easier save window size? Go to a dialog to set value > or do nothing? No dialog. Take the current window size and save it when the save button is

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Bo Peng
> No dialog. Take the current window size and save it when the save button > is pressed. You said later that you want to save it only once > Yet, I must agree with Lars here. Window size is a "save once" thing. > Once you have found the right size, it is wrong to save it every time > again

Re: [Fwd: What is the qt functions to get/set position of the main window?]

2006-03-26 Thread Martin Vermeer
On Sun, 2006-03-26 at 23:15 -0600, Bo Peng wrote: > > No dialog. Take the current window size and save it when the save button > > is pressed. > > You said later that you want to save it only once Yes. I meant the save button in the preferences dialog. It is (and can be) only pressed when