octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #7857] Replace dynamic casts of GUI/IDE ed


From: Dan Sebald
Subject: [Octave-patch-tracker] [patch #7857] Replace dynamic casts of GUI/IDE editor with more slots/signals configuration
Date: Mon, 29 Oct 2012 23:37:22 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.6.24-1.fc14 Firefox/3.6.24

Follow-up Comment #6, patch #7857 (project octave):

This "hg import --exact" is pretty nice.  It appears that the file patches
cleanly and is automatically rebased.  I suppose why this works is that the
diff files can be pretty illogical sometimes, with big hunks of code removed
then added somewhere else.  I'm going to guess that Mercurial pushes the
imported changeset as far forward as possible retaining no loss of hunks, not
certain.

Anyway, thanks for the bug reports.  What I've done is added changesets to the
original patch.  So the attached patch has four changesets within.  Let me
know how well Mercurial applies this changeset via "import".  There are so
many alternatives for Mercurial changesets, let's see how this works.  If this
turns out to be dodgy, I can create a single up-to-date changeset in the
historical way.


> - The setting "Show complete path in window title" is ignored (there are
both
at the same time, short and long titles)

This is a two line fix.  The file_editor was initially supplying the name to
the command which is always full path.  One solution would be to remove the
path inside file_editor, but I prefer supplying an empty file name then have
file_editor_tab update the name, i.e., code re-use instead of duplication.

On this matter, what I'd kind of like is a short file name in the tab entry,
and then when positioning mouse cursor over tab a dialog pops up that contains
the full path name; tough to do though because tab object is part of the Qt
library.  Would have to create a new object derived from the tab container
with an override of the display function.


> - It is not possible to run a script from the editor (Ctrl-R)

Oversight.  In the original patch I removed the _editor indirection of
file_editor_tab but forgot to implement what used to be
_editor->terminal()->sendText().  I simply connected a new signal for
file_editor_tab to the existing handle_command_double_clicked (misnomer, as
"double click" hasn't much to do with the function) of the main_window:

  connect (f, SIGNAL (process_octave_code (const QString&)),
           parent (), SLOT (handle_command_double_clicked (const QString&)));

which is a pretty simple and elegant solution--code reuse and signal/slot
paradigm.  (The double-click in the history has problems, BTW...but that
doesn't have much to do with this changeset.)


> - Directly after octave came up a file can be opened several times in the
editor wihtout error message; only after a "Save as" the check for multiple
open files seems to work

Good catch.  The fetFileNames list is not updated at initialization.  Rather
than do that at startup, I moved a list clear/generate inside
request_open_file: 

      // Have all file editor tabs signal what their file names are.
      fetFileNames.clear ();
      emit fetab_file_name_query (0);


> - After having closed all open files in the editor I get the message that
the
file is already open while trying to reopen one of the files previously
closed

I believe this is the same problem as previous, only manifested slightly
different.  Whereas in the previous case the file list was empty so kept
allowing the same file to be opened, after the close the file list was bogus
and wouldn't allow closed files to be re-opened.


> - Saving a file ("Save", not "Save as") leads to the message that another
application has changed the file

I don't see this problem.  Perhaps you can be more descriptive of exactly how
you opened/created the file tab before attempting a "Save" (e.g., created new,
opened existing file).


(file #26854)
    _______________________________________________________

Additional Item Attachment:

File name: octave-gui_no_casts-2012oct29.patch Size:80 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?7857>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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