Re: [Texmacs-dev] TeXmacsQT minibuffer prompt implemented in the status bar

2010-11-05 Thread Miguel de Benito Delgado
Hi Massimiliano,

On Fri, Nov 5, 2010 at 23:08, Gubinelli Massimiliano
wrote:

> For me the canvas seems to resize fine when the input prompt is displayed.
> What are exaclty the problems you experience?
>

Well... none? They went away somehow. Maybe something you did, maybe that
thing with substituting a new status bar for the old one, I couldn't tell
right now. The problem was that the white area, the sheet, didn't grow with
the window beyond it's original size when the input prompt popped up. It's
now gone, anyway!

Regards,

Miguel de  Benito.
___
Texmacs-dev mailing list
Texmacs-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/texmacs-dev


Re: [Texmacs-dev] TeXmacsQT minibuffer prompt implemented in the status bar

2010-11-05 Thread Gubinelli Massimiliano
Hi Miguel,

I've commited your code to svn (both the drag&drop support and the input 
prompt). Thanks for the contribution.

For the moment the input prompt is ifdeffed out because it is not quite 
ready.Hovewer being on svn we can work on the same basis. Please give a look at 
my attemps to have a "almost modal" widget. They are not quite right. Maybe you 
can find a better solution.


On 5 nov. 2010, at 23:03, Miguel de Benito Delgado wrote:

> Besides, what do you think of the problem with the resizing of the canvas? 
> Someone isn't getting the relevant "grow this region" messages, right? I 
> should have spent some time with that, but instead I focused on digging out a 
> bug of which I'll post a separate report in a few minutes.


For me the canvas seems to resize fine when the input prompt is displayed. What 
are exaclty the problems you experience?

best
massimiliano


> 
> Regards, 
> 
> Miguel de  Benito.
> 
> ___
> Texmacs-dev mailing list
> Texmacs-dev@gnu.org
> http://lists.gnu.org/mailman/listinfo/texmacs-dev


___
Texmacs-dev mailing list
Texmacs-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/texmacs-dev


Re: [Texmacs-dev] TeXmacsQT minibuffer prompt implemented in the status bar

2010-11-05 Thread Miguel de Benito Delgado
Hi,

  thank you for taking some time to review my code.

On Fri, Nov 5, 2010 at 21:52, Gubinelli Massimiliano 
 wrote:
>
> I was wondering if on your machine the widget is really modal or not?
>

Well, this is proof of how bad a tester I can be. No, it's not modal, I just
foolishly assumed it to be. I'm sorry I claimed it was.


> According to the Qt docs you cannot have a non top level widget modal.
>
A possible solution (on the short term) would be to check if we loose focus
> and in the case dismiss the widget and quit the run loop.
>

That'd be easy. I'll give it a try.


>  Other solution would be to prevent the focus to go away but I do not find
> any possibility for this in Qt.
>

Maybe a combination of grabKeyboard(), setFocus() and QEvent::FocusOut
catching? I'm going to experiment a bit with it.

Besides, what do you think of the problem with the resizing of the canvas?
Someone isn't getting the relevant "grow this region" messages, right? I
should have spent some time with that, but instead I focused on digging out
a bug of which I'll post a separate report in a few minutes.

Regards,

Miguel de  Benito.
___
Texmacs-dev mailing list
Texmacs-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/texmacs-dev


Re: [Texmacs-dev] TeXmacsQT minibuffer prompt implemented in the status bar

2010-11-05 Thread Gubinelli Massimiliano
Dear Miguel,
 I'm trying your patch to prepare it for inclusion in svn. It seems fine and 
look quite nice, even if I think we will have still to work on the appearence. 
Main problem now is that on my Mac (Qt/Cocoa 4.7.0) your event loop does not 
prevent the widget to loose focus (the window is not quite modal). So for 
example you can return to the canvas, type or open a replace dialog inside a 
running replace dialog.

I was wondering if on your machine the widget is really modal or not?

According to the Qt docs you cannot have a non top level widget modal.

A possible solution (on the short term) would be to check if we loose focus and 
in the case dismiss the widget and quit the run loop. Other solution would be 
to prevent the focus to go away but I do not find any possibility for this in 
Qt.

Best
Massimiliano



On 2 nov. 2010, at 19:40, Miguel de Benito Delgado wrote:

> Hi,
> 
>   I'm sorry for all the noise (meaning my duplicate email), I wasn't 
> receiving my mails back from the list and I thought they hadn't got through 
> some spam filter, so I sent yet another one. I just checked and saw your 
> reply, which by the way I don't fully understand.
> 
> My first issue is already solved, as you can see in my last post, but the one 
> with the canvas not being repainted isn't. You said:
> 
> I doubt that reimplementing an event loop would be a good solution. Probably 
> Qt allows for passing all incoming events to a subwidget.
> 
> Indeed it does, though I think they are actually propagated to parent 
> widgets, which is what the main window is with respect to the status bar. And 
> in what I wrote, as far as I understand it, no event other than a key press 
> is being handled, so there should be no "hijacking".  I'll look into it and 
> get back to you when I have a solution.
> 
> Regards,
> 
> Miguel de  Benito.
> 
> ___
> Texmacs-dev mailing list
> Texmacs-dev@gnu.org
> http://lists.gnu.org/mailman/listinfo/texmacs-dev

___
Texmacs-dev mailing list
Texmacs-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/texmacs-dev


Re: [Texmacs-dev] TeXmacsQT minibuffer prompt implemented in the status bar

2010-11-02 Thread Miguel de Benito Delgado
Hi,

  I'm sorry for all the noise (meaning my duplicate email), I wasn't
receiving my mails back from the list and I thought they hadn't got through
some spam filter, so I sent yet another one. I just checked and saw your
reply, which by the way I don't fully understand.

My first issue is already solved, as you can see in my last post, but the
one with the canvas not being repainted isn't. You said:

I doubt that reimplementing an event loop would be a good solution. Probably
> Qt allows for passing all incoming events to a subwidget.


Indeed it does, though I think they are actually propagated to parent
widgets, which is what the main window is with respect to the status bar.
And in what I wrote, as far as I understand it, no event other than a key
press is being handled, so there should be no "hijacking".  I'll look into
it and get back to you when I have a solution.

Regards,

Miguel de  Benito.
___
Texmacs-dev mailing list
Texmacs-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/texmacs-dev


Re: [Texmacs-dev] TeXmacsQT minibuffer prompt implemented in the status bar

2010-11-02 Thread Joris van der Hoeven
Dear Miguel,

On Mon, Nov 01, 2010 at 04:11:49PM +0100, Miguel de Benito Delgado wrote:
>   my name is Miguel, I'm in the process of becoming a mathematician and I
> have been using TeXmacs for the last four years for all my tex-like work. Of
> course I love it and I'm very pleased to have now some spare time to work on
> it. Yesterday I submitted to Savannah's patch tool a small patch for a
> drag&drop feature in the "Open File" dialog (QT), which as a MacOS user I
> was definitely missing. But since I've noticed very low activity in
> Savannah, I'm now posting my second patch here.

For sure, your contributions are welcome. We are not reactive all the time,
but try to do our best to incorporate patches.

>  However simple this might be, I do have two unsolved issues:
> 
> 1. I've decided to simply insert the widgets at the leftmost position of the
> status bar, leaving the rest to adjust itself. This is not pretty, because
> any previous status messages are still displayed, but I couldn't think of
> any other solution, short of replacing the QStatusBar, then restore the
> original one. But since QMainWindow takes ownership of it and deletes any
> objects when it deems necessary, I ended up with some nasty EXC_BAD_ACCESS.
> Any ideas?

Please look at the X11 implementation: it uses the replacement trick.

> 2. Since to make it "modal" I'm executing a local QEventLoop, resizeEvents
> are not being sent wherever they are meant to, and the canvas does not
> update if one resizes the window while the interactive prompt is on. I guess
> I'd have to update the canvas, or whatever, from within
> QWidget::resizeEvent(). What should I do in there?

In the X11 implementation, the widget is not modal.
I agree that it would be better to make it modal,
but I doubt that reimplementing an event loop would be a good solution.
Probably Qt allows for passing all incoming events to a subwidget.
Otherwise, such as system might be implemented.

Max?

Best wishes, --Joris

___
Texmacs-dev mailing list
Texmacs-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/texmacs-dev