|
From: | Patrick Martin |
Subject: | Re: Octave Gui Bug (Maybe) |
Date: | Thu, 6 Jun 2013 07:57:09 -0400 |
On 06/05/2013 03:09 PM, John Donoghue wrote:
[snip][snip]
> On 06/05/2013 12:50 PM, Patrick Martin wrote:
>
> > Hello,
> >
> > I pulled down the most recent source for Octave and it built
> > successfully. When I run octave, it correctly pulls up the gui
and the
> > command line works fine. However, the buttons for opening a
script file,
> > or calling "edit somthing.m" nothing happens. Did I miss a library
> > during compile time? Should I grab a different branch to compile?
Good point. Alternately, try something like this in the build directory:
Out of interest sake, if you click on the "new" file button on the
editor, does it display a new file window? I am wondering whether
QScintilla was enabled?
John
[sebald@ build1]$ grep QSCINTILLA config.h
#define HAVE_QSCINTILLA 1
In any case, I've looked into this further and the way that things are set up is sort of a bug. It may well be that Patrick's system doesn't have QScintilla, but Octave GUI should fall back on the editor that is shown in
ans =edit get all
scalar structure containing the fields:
EDITOR = emacs %s
HOME = /home/sebald/octave
AUTHOR = Daniel J Sebald
EMAIL = [](0x0)
LICENSE = GPL
MODE = async
EDITINPLACE = 1
if that is true. However, I know it isn't doing that. Here is the hunk of code for opening the file via "status = __octave_link_edit_file__ (file);"
bool
octave_qt_link::do_edit_file (const std::string& file)
{
emit edit_file_signal (QString::fromStdString (file));
return true;
}
It is returning true in all cases, even if QScintilla editor isn't present. The minimal fix should be something like:
bool
octave_qt_link::do_edit_file (const std::string& file)
{
#ifdef HAVE_QSCINTILLA
emit edit_file_signal (QString::fromStdString (file));
return true;
#else
return false;
#endif
}
But even that isn't proper in some respects. The way this should work is that the routine should emit the signal and then go into a wait state until it gets a wakeup and info about the success of the opening of the file from some other signal. If QScintilla isn't present that editor slot should be a rudimentary thing that simply sets the result to false then wakes the worker (Octave) process.
Torsten, if you are following, would you like to look into this? Otherwise I will a changeset this weekend.
Dan
This information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies.
[Prev in Thread] | Current Thread | [Next in Thread] |