Ticket #1490 (closed defect: fixed)

Opened 15 years ago

Last modified 14 years ago

Multiple viewers and editors open concurrently with the file manager

Reported by: dborca Owned by: andrew_b
Priority: major Milestone: 4.7.5
Component: mc-core Version: master
Keywords: Cc: dborca@…
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description (last modified by andrew_b) (diff)

Ok, this is my second-favourite patch :)
A nice feature of Advanced Midnight Commander mc-4.1.x-MP by Olegarch was the dialog selector. It allowed the user to have multiple viewers and editors open along with the main file manager. They can be switched at will. Note that this does NOT imply multi-threading, because there's no point for editors, viewers and file-managers to run in background; they primarily need user interaction.
The hotkeys for Multi Screen feature:
"M-`" selector
"M-," switch to previous
"M-." switch to next
Yes, I know the hotkeys are not very well-chosen, but I really tried hard to avoid clashes with existing hotkeys. (I just saw M-. was taken in GIT, but honestly, I don't need a hotkey to switch hidden files on and off very frequently; I can live with just a setting in Options for that :))
Patch (against 4.7.0-pre1) attached.

Attachments

mc-4.7.0-pre1.dlgswitch.patch.gz (8.2 KB) - added by dborca 15 years ago.
mc-4.7.0-pre1.dlgswitch.patch (31.4 KB) - added by angel_il 15 years ago.

Change History

Changed 15 years ago by dborca

comment:1 Changed 15 years ago by dborca

  • Cc dborca@… added

comment:2 Changed 15 years ago by andrew_b

Please, don't include diffs of autogenerated stuff (Makefile.in, config.h.in, configure) into patches.

comment:3 Changed 15 years ago by angel_il

and please dont gzip files before attach :)

Changed 15 years ago by angel_il

comment:4 Changed 15 years ago by angel_il

  • Milestone changed from 4.7.0-pre2 to 4.7.0-pre3

comment:5 follow-up: ↓ 6 Changed 15 years ago by slavazanko

is this related to #280?

comment:6 in reply to: ↑ 5 Changed 15 years ago by dborca

Replying to slavazanko:

is this related to #280?

No. It is much, much better. :)

comment:7 follow-ups: ↓ 8 ↓ 9 Changed 15 years ago by angel_il

is this related to #280?

No. It is much, much better. :)

i see :)
But what mcedit will do with unsaved opened files when the terminal will close?

comment:8 in reply to: ↑ 7 Changed 15 years ago by dborca

Replying to angel_il:

is this related to #280?

No. It is much, much better. :)

i see :)
But what mcedit will do with unsaved opened files when the terminal will close?

That is handled by dlgswitch_before_exit(). The user is automatically switched to all editors with unsaved files (all others are closed). Switching is disabled when doing this, to prevent the user to do "smart" things. :)

comment:9 in reply to: ↑ 7 ; follow-up: ↓ 10 Changed 15 years ago by dborca

Replying to angel_il:

is this related to #280?

No. It is much, much better. :)

i see :)
But what mcedit will do with unsaved opened files when the terminal will close?

Sorry, I just saw that I answered earlier what happens when Midnight will close. But probably you already knew that. :)

You asked "when the terminal will close". Well, the files remain unsaved and locks are left behind. But that is not a new problem, because I ask you: currently, when we have only one editor instance, what will happen with unsaved opened file when the terminal will close? It's just the same.

comment:10 in reply to: ↑ 9 Changed 15 years ago by angel_il

Replying to dborca:

Replying to angel_il:

is this related to #280?

No. It is much, much better. :)

i see :)
But what mcedit will do with unsaved opened files when the terminal will close?

Sorry, I just saw that I answered earlier what happens when Midnight will close. But probably you already knew that. :)

yes, of course. Because I think about this many times. :)

You asked "when the terminal will close". Well, the files remain unsaved and locks are left behind. But that is not a new problem, because I ask you: currently, when we have only one editor instance, what will happen with unsaved opened file when the terminal will close? It's just the same.

When only one file is opened i will see that it is not saved. It's eyse...
but when them is opened much, it is much more difficult...
That why i do not allow to be switched to other file, while the current is not saved (in #280)

comment:11 Changed 15 years ago by angel_il

branch: 1490_dlgswitch (parent: master)
changeset: 4c749491db57aa1f3555706d413094ce2b4a29f6

comment:12 Changed 15 years ago by andrew_b

  • Priority changed from major to minor

Patch and branch must be reworked to use glib functions as much as possible.

comment:13 Changed 15 years ago by andrew_b

Also src/dlgswitch.[ch] are not in the branch.

comment:14 Changed 15 years ago by angel_il

in dlgswitch.c i see:
Copyright (c) 2009 Daniel Borca All rights reserved

you mean:

Copyright (C) 2009 Free Software Foundation, Inc.

Written by: Daniel Borca

?

comment:15 follow-up: ↓ 16 Changed 15 years ago by dborca

Yep. You can change that.

comment:16 in reply to: ↑ 15 Changed 15 years ago by angel_il

Replying to dborca:

Yep. You can change that.

ok :), i'll fix it in branch...

comment:17 Changed 15 years ago by ossi

without a written (on paper!) copyright assignment, dborca's copyright notice is the only legally relevant one anyway. of course, that applies equally to all code written by anyone else who did not sign such a paper.

comment:18 Changed 15 years ago by angel_il

  • Owner set to angel_il
  • Status changed from new to accepted

comment:19 Changed 15 years ago by angel_il

  • Milestone changed from 4.7.0-pre3 to 4.7.0-pre4

comment:20 Changed 15 years ago by angel_il

  • Milestone changed from 4.7.0-pre4 to 4.7.0-pre5

comment:21 Changed 15 years ago by angel_il

  • Milestone changed from 4.7.0 to 4.7

comment:22 Changed 15 years ago by andrew_b

  • Owner changed from angel_il to andrew_b
  • severity changed from no branch to on review
  • Milestone changed from 4.7 to 4.7.3

Created 1490_multi_screens branch. Parent branch is master.
Initial changeset:af4a527077f580277e86718972870624b5215fcc

comment:23 Changed 15 years ago by andrew_b

Rebased to current master.
Initial changeset:5373cf29fff57105ff65424b065cb286fadc7600

comment:24 Changed 15 years ago by angel_il

  • Votes for changeset set to angel_il

comment:25 Changed 15 years ago by slavazanko

  • Votes for changeset changed from angel_il to angel_il slavazanko
  • severity changed from on review to approved

comment:26 Changed 15 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from angel_il slavazanko to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged

Merged to master.
changeset:9adda31a9f1accc0785f7dbd87d75a7f3af39f76

git log --pretty=oneline 104c2a0..9adda31

comment:27 Changed 15 years ago by andrew_b

  • Status changed from testing to closed
  • Description modified (diff)

comment:28 Changed 15 years ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset committed-master deleted
  • severity changed from merged to on review
  • Type changed from enhancement to defect
  • Priority changed from minor to major
  • Version changed from 4.7.0-pre1 to master
  • Resolution fixed deleted

Exit from subshell is handled incorrectly.

Created 1490_exit_subshell_fix branch. Parent branch is master.
changeset:fb017ef20ae1a0ac23c754dd4df3fd1c04b066ad

comment:29 Changed 15 years ago by angel_il

  • Votes for changeset set to angel_il

comment:30 Changed 15 years ago by slavazanko

  • Votes for changeset changed from angel_il to angel_il slavazanko
  • severity changed from on review to approved

comment:31 Changed 15 years ago by andrew_b

  • Status changed from reopened to closed
  • Votes for changeset changed from angel_il slavazanko to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:32 Changed 14 years ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset committed-master deleted
  • Resolution fixed deleted
  • severity changed from merged to no branch
  • Milestone changed from 4.7.3 to 4.7.5

Multi-screen angine doesn't handle correctly some cases.
Example:

  1. Run mc.
  2. Open some file in internal editor.
  3. Switch back to the file panels.
  4. Open another file in internal editors. As a result, two editors are opened.
  5. Close current editor. Now you are in file panels.
  6. Run screen list dialog (Meta-`).

6a. The 1st editor is highlighted as current screen. This is wrong. Current screen is file panels.
6b. Cannot switch to the opened editor in this dialog.

comment:33 Changed 14 years ago by zaytsev

Just for the record: the same is true for viewers.

And, by the way, when you open Meta+` the cursor is blinking in a strange place. I would have expected it to blink in the lower bottom corner. However, the same is true for F2 dialog, so it's not a multiscreen problem as such.

comment:34 Changed 14 years ago by andrew_b

  • severity changed from no branch to on review

Created 1490_multiscreen_fix branch. Parent branch is master.
changeset:451765a48314167ffca058b71e44c69409e63c6b

comment:35 Changed 14 years ago by angel_il

  • Votes for changeset set to angel_il

comment:36 Changed 14 years ago by zaytsev

  • Votes for changeset changed from angel_il to angel_il zaytsev
  • severity changed from on review to approved

comment:37 Changed 14 years ago by andrew_b

  • Status changed from reopened to closed
  • Votes for changeset changed from angel_il zaytsev to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:39 Changed 14 years ago by andrew_b

#2264 fixes segfault in "Advanced Chown" dialog.
#2284 fixes segfault in autocompletion.

Note: See TracTickets for help on using tickets.