Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple viewers and editors open concurrently with the file manager #1490

Closed
mc-butler opened this issue Aug 6, 2009 · 41 comments
Closed
Assignees
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/1490
Reporter dborca (dborca@….com)
Mentions dborca@….com

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.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by dborca (dborca@….com) on Aug 6, 2009 at 23:52 UTC

@mc-butler
Copy link
Author

Changed by dborca (dborca@….com) on Aug 6, 2009 at 23:59 UTC (comment 1)

  • Cc set to dborca@….com

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Aug 7, 2009 at 4:39 UTC (comment 2)

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

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 7, 2009 at 5:22 UTC (comment 3)

and please dont gzip files before attach :)

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 7, 2009 at 5:23 UTC

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 7, 2009 at 6:00 UTC (comment 4)

  • Milestone changed from 4.7.0-pre2 to 4.7.0-pre3

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Aug 7, 2009 at 7:21 UTC (comment 5)

is this related to #280?

@mc-butler
Copy link
Author

Changed by dborca (dborca@….com) on Aug 7, 2009 at 12:48 UTC (comment 5.6)

Replying to slavazanko:

is this related to #280?

No. It is much, much better. :)

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 7, 2009 at 19:08 UTC (comment 7)

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?

@mc-butler
Copy link
Author

Changed by dborca (dborca@….com) on Aug 7, 2009 at 19:11 UTC (comment 7.8)

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. :)

@mc-butler
Copy link
Author

Changed by dborca (dborca@….com) on Aug 7, 2009 at 20:49 UTC (comment 7.9)

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.

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 8, 2009 at 4:51 UTC (comment 9.10)

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)

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 8, 2009 at 6:12 UTC (comment 11)

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Aug 8, 2009 at 10:02 UTC (comment 12)

  • Priority changed from major to minor

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Aug 8, 2009 at 10:06 UTC (comment 13)

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

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 12, 2009 at 16:03 UTC (comment 14)

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

?

@mc-butler
Copy link
Author

Changed by dborca (dborca@….com) on Aug 12, 2009 at 16:37 UTC (comment 15)

Yep. You can change that.

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 12, 2009 at 17:53 UTC (comment 15.16)

Replying to dborca:

Yep. You can change that.

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

@mc-butler
Copy link
Author

Changed by ossi (@ossilator) on Aug 12, 2009 at 18:32 UTC (comment 17)

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.

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Aug 29, 2009 at 7:27 UTC (comment 18)

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

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Sep 22, 2009 at 18:01 UTC (comment 19)

  • Milestone changed from 4.7.0-pre3 to 4.7.0-pre4

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Oct 21, 2009 at 9:46 UTC (comment 20)

  • Milestone changed from 4.7.0-pre4 to 4.7.0-pre5

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Nov 18, 2009 at 22:04 UTC (comment 21)

  • Milestone changed from 4.7.0 to 4.7

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 15, 2010 at 12:14 UTC (comment 22)

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

Created 1490_multi_screens branch. Parent branch is master.
Initial [af4a527077f580277e86718972870624b5215fcc]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 16, 2010 at 9:31 UTC (comment 23)

Rebased to current master.
Initial [5373cf29fff57105ff65424b065cb286fadc7600]

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Jun 18, 2010 at 20:14 UTC (comment 24)

  • Votes set to angel_il

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Jun 22, 2010 at 13:13 UTC (comment 25)

  • Severity changed from on review to approved
  • Votes changed from angel_il to angel_il slavazanko

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 22, 2010 at 17:51 UTC (comment 26)

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

Merged to master.
[9adda31]

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 22, 2010 at 17:52 UTC (comment 27)

  • Status changed from testing to closed
  • Description edited

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 23, 2010 at 9:53 UTC (comment 28)

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

Exit from subshell is handled incorrectly.

Created 1490_exit_subshell_fix branch. Parent branch is master.
[fb017ef20ae1a0ac23c754dd4df3fd1c04b066ad]

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Jun 24, 2010 at 11:07 UTC (comment 29)

  • Votes set to angel_il

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Jun 25, 2010 at 10:17 UTC (comment 30)

  • Severity changed from on review to approved
  • Votes changed from angel_il to angel_il slavazanko

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jun 25, 2010 at 10:21 UTC (comment 31)

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

Merged to master.
[f86415f]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 20, 2010 at 8:54 UTC (comment 32)

  • Votes committed-master deleted
  • Severity changed from merged to no branch
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • 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.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 20, 2010 at 9:12 UTC (comment 33)

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.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 20, 2010 at 9:50 UTC (comment 34)

  • Severity changed from no branch to on review

Created 1490_multiscreen_fix branch. Parent branch is master.
[451765a48314167ffca058b71e44c69409e63c6b]

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Sep 20, 2010 at 12:55 UTC (comment 35)

  • Votes set to angel_il

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 20, 2010 at 13:09 UTC (comment 36)

  • Votes changed from angel_il to angel_il zaytsev
  • Severity changed from on review to approved

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 20, 2010 at 15:33 UTC (comment 37)

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

Merged to master.
[451765a48314167ffca058b71e44c69409e63c6b]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Sep 20, 2010 at 15:42 UTC (comment 38)

Sorry, [6cfefe7].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 18, 2010 at 12:59 UTC (comment 39)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress
Development

No branches or pull requests

2 participants