Ticket #1490 (closed defect: fixed)

Opened 13 months ago

Last modified 3 months ago

Multiple viewers and editors open concurrently with the file manager

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

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 13 months ago.
mc-4.7.0-pre1.dlgswitch.patch (31.4 kB) - added by angel_il 13 months ago.

Change History

Changed 13 months ago by dborca

  Changed 13 months ago by dborca

  • cc dborca@… added

  Changed 13 months ago by andrew_b

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

  Changed 13 months ago by angel_il

and please dont gzip files before attach :)

Changed 13 months ago by angel_il

  Changed 13 months ago by angel_il

  • milestone changed from 4.7.0-pre2 to 4.7.0-pre3

follow-up: ↓ 6   Changed 13 months ago by slavazanko

is this related to #280?

in reply to: ↑ 5   Changed 13 months ago by dborca

Replying to slavazanko:

is this related to #280?

No. It is much, much better. :)

follow-ups: ↓ 8 ↓ 9   Changed 13 months 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?

in reply to: ↑ 7   Changed 13 months 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. :)

in reply to: ↑ 7 ; follow-up: ↓ 10   Changed 13 months 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.

in reply to: ↑ 9   Changed 13 months 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)

  Changed 13 months ago by angel_il

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

  Changed 13 months ago by andrew_b

  • priority changed from major to minor

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

  Changed 13 months ago by andrew_b

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

  Changed 13 months 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

?

follow-up: ↓ 16   Changed 13 months ago by dborca

Yep. You can change that.

in reply to: ↑ 15   Changed 13 months ago by angel_il

Replying to dborca:

Yep. You can change that.

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

  Changed 13 months 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.

  Changed 13 months ago by angel_il

  • owner set to angel_il
  • status changed from new to accepted

  Changed 12 months ago by angel_il

  • milestone changed from 4.7.0-pre3 to 4.7.0-pre4

  Changed 11 months ago by angel_il

  • milestone changed from 4.7.0-pre4 to 4.7.0-pre5

  Changed 10 months ago by angel_il

  • milestone changed from 4.7.0 to 4.7

  Changed 3 months 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

  Changed 3 months ago by andrew_b

Rebased to current master.
Initial changeset:5373cf29fff57105ff65424b065cb286fadc7600

  Changed 3 months ago by angel_il

  • votes set to angel_il

  Changed 3 months ago by slavazanko

  • votes changed from angel_il to angel_il slavazanko
  • severity changed from on review to approved

  Changed 3 months ago by andrew_b

  • status changed from accepted to testing
  • votes 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

  Changed 3 months ago by andrew_b

  • status changed from testing to closed
  • description modified (diff)

  Changed 3 months ago by andrew_b

  • status changed from closed to reopened
  • votes 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

  Changed 3 months ago by angel_il

  • votes set to angel_il

  Changed 3 months ago by slavazanko

  • votes changed from angel_il to angel_il slavazanko
  • severity changed from on review to approved

  Changed 3 months ago by andrew_b

  • status changed from reopened to closed
  • votes changed from angel_il slavazanko to committed-master
  • resolution set to fixed
  • severity changed from approved to merged
Note: See TracTickets for help on using tickets.