[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave Gui Bug (Maybe)
From: |
Daniel J Sebald |
Subject: |
Re: Octave Gui Bug (Maybe) |
Date: |
Wed, 05 Jun 2013 19:02:55 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 06/05/2013 03:09 PM, John Donoghue wrote:
[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?
[snip]
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
Good point. Alternately, try something like this in the build directory:
[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
edit get all
ans =
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
- Octave Gui Bug (Maybe), Patrick Martin, 2013/06/05
- Re: Octave Gui Bug (Maybe), John Donoghue, 2013/06/05
- Re: Octave Gui Bug (Maybe),
Daniel J Sebald <=
- Re: Octave Gui Bug (Maybe), Patrick Martin, 2013/06/06
- Re: Octave Gui Bug (Maybe), Daniel J Sebald, 2013/06/06
- Re: Octave Gui Bug (Maybe), Patrick Martin, 2013/06/06
- Re: Octave Gui Bug (Maybe), Daniel J Sebald, 2013/06/07
- Re: Octave Gui Bug (Maybe), Patrick Martin, 2013/06/07
- Re: Octave Gui Bug (Maybe), Patrick Martin, 2013/06/07