Ticket #1490 (closed enhancement: fixed) — at Version 27

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.

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)
Note: See TracTickets for help on using tickets.