octave-maintainers
[Top][All Lists]
Advanced

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

Re: Octave Gui Bug (Maybe)


From: Patrick Martin
Subject: Re: Octave Gui Bug (Maybe)
Date: Thu, 6 Jun 2013 07:57:09 -0400

Thanks for digging into this issue! I logged into my Gnome desktop environment and it does not work either. In fact, if I go to the menu and select "Open.." no file browser window pops up.

I did check my ubuntu synaptic manager and saw that libqscintilla is not installed. I have now installed it. Should I recompile and add back in the line you told me to comment?

Patrick


On Wed, Jun 5, 2013 at 8:02 PM, Daniel J Sebald <address@hidden> wrote:
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



--
Patrick Martin, PhD
Assistant Professor
Electrical and Computer Engineering
Department of Physical Sciences
York College of Pennsylvania
www.drpatrickmartin.com
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.





reply via email to

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