[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Miguel de Benito Delgado
Subject: [Texmacs-dev] TeXmacsQT minibuffer prompt implemented in the status bar
Date: Mon, 1 Nov 2010 16:11:49 +0100

Hi all,

  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.

I've just finished implementing what I think is the following item in src/Plugins/qt/TODO:

* Implement "minibuffer" interactions (currently a dialog pop up instead)

It's just displaying a couple of widgets in the status bar instead of a pop up, so the code is basically the same as before plus two files in Plugins/Qt/, namely a QWidget ("QTMInteractivePrompt") to be inserted in the status bar, together with its header file. It behaves normally, accepting Return/Escape.

 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?

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?

 I'm attaching a zip file with the svn diff from src/, (revision 3519) together with the two new files. The diff contains also the changes I made for my first patch, but those are minimal and should hopefully cause no trouble. 

Miguel de  Benito.

Attachment: patch-against-rev-3519.zip
Description: Zip archive

reply via email to

[Prev in Thread] Current Thread [Next in Thread]