Commit Graph

582 Commits

Author SHA1 Message Date
Andrew Borodin
f86415f03e Ticket #1490: fix of exit from subshell handling.
If several screens are opened, exit from subshell is handled
icorrectly.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-25 14:26:42 +04:00
Andrew Borodin
15a7b10191 Ask user before exit if there are opened screens in MC.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:22 +04:00
Andrew Borodin
cf6098505c Close dialogs during MC shutdown.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:15 +04:00
Andrew Borodin
56bbdeb15f Support of multiple editors and viewers.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
a87165824c Added function to get dialog title.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
95e4424e92 Renamed current_dlg variable to top_dlg.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
74651f2e9f Added modal flag to the dialog structure.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
5c9826a897 Renamed dlg_id and parent fields of Widget structure.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
6efe7f2216 Reimplemented widget list in dialog using GList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
0e0f9c8ccd Added dialog state (active, suspended, closed).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
62f0f101d7 Reimplemented dialogs stack using GList.
Code reorganization in src/dialog.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:18 +04:00
Andrew Borodin
166fcfc15f Stop quick search before executing any main menu command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-16 13:42:23 +04:00
Andrew Borodin
0485ae5026 Ticket #2196: editor hangup if editor_tab_spacing is equalt to 0.
Check and correct value of option_tab_spacing during options loading.
Check and correct value of option_word_wrap_line_length during options loading
and after editor options changing.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-14 13:53:02 +04:00
Ilia Maslakov
c46e2925e1 Ticket #30 (use external clipboard utility)
added params clipbord_store, clipbord_paste into [Misc] section.
    created src/clipbord.[ch]
    added copy_file_to_ext_clip, paste_to_file_from_ext_clip for copy/paste
    text to the global X clipboard.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-06-11 13:47:46 +00:00
Andrew Borodin
aa0d96bd8b Ticket #1646: removed leading and trailing spaces in i18n resources.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 21:42:46 +04:00
Andrew Borodin
6d5c2628fe Ticket #2042: added a capability to create relative symlinks.
The original patch was posted by Anton Monroe <akm at meer dot net>
to mc-devel@gnome.org mailing list:
http://mail.gnome.org/archives/mc-devel/2006-April/msg00020.html

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-22 12:08:18 +04:00
Andrew Borodin
2b167cbef0 Configuration dialogs reorganization.
Panel options are moved to new dialog.
Panel setup options are collected in a special structure.
Includes clean up.
Code indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
4ef4a5e032 Ticket #320: menu and configuration dialogs reorganization.
'Left'/'Right' menu was reorganized.
'File listing' menu item was added to fast switch file panel
to file listing mode.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:44:42 +04:00
Andrew Borodin
22b53cdf58 Ticket #2187: fix of broken 'mc -e' and 'mc -v' modes.
Initial step: refactoring: a piece of code was moved form main.c
into args.c. Some functions and variables were renamed.
Fixed includes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 11:27:42 +04:00
Ilia Maslakov
823387a793 Removed hardcoded hotkeys in dialog.c Replaced keymap's initialization from main.c into setup.c
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

Collect keybind-related variables in src/keybind.[ch] files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-07 15:02:11 +04:00
Andrew Borodin
9970def1c2 More accuracy of Diff Viewer conditiona compilation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Vit Rosin
993d678ed9 Use EXIT_FAILURE symbolic name as return code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
4cea5be1ac Ticket #2097: clean up before 4.7.2 release.
Split assignments and conditions. Type accuracy. Minor optimization.

Thanks Vit Rosin for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:23:51 +04:00
Slava Zanko
3a1e0966ae Final Indentation of all touched files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-04 17:34:21 +03:00
Slava Zanko
35dae723ee Changes into src directory:
* src/background.c:
   * handling read() errors in background_attention()
   * handling IO errors in parent_call_string()
   * ignoring IO errors in background_attention()
   * ignoring write() errors in parent_call_header()
   * ignore IO errors in parent_call()
 *  src/cons.saver.c:
   * handling IO errors in show_console_contents_linux()
   * handling IO errors in handle_console_linux()
 * src/file.c: handling mc_chdir() errors in panel_operate
 * src/find.c: ignoring errors on chdir() call
 * src/main.c:
   * ignoring errors on last write()'s in main()
   * ignoring mc_chdir() errors in setup_dummy_mc()
   * ignoring mc_chdir() errors in translated_mc_chdir()
 * src/panelize.c: ignoring errors on chdir() call
 * src/screen.c:
   * ignoring mc_chdir() errors in panel_new_with_dir()
   * ignoring mc_chdir() errors in reload_panelized()
   * ignoring mc_chdir() errors in update_panels()
 * src/subshell.c: ignoring errors on chdir() call
 * src/tree.c: ignoring mc_chdir() errors in tree_rescan()
 * src/treestore.c: handling read errors in tree_store_load_from()
 * src/widget.c: handling mc_write() errors in save_text_to_clip_file

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-04 17:34:20 +03:00
Andrew Borodin
78032688f5 Added capability to run MC as standalone diff viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-26 11:44:31 +04:00
Ilia Maslakov
329ef3846a Ticket #120 (View diff files)
added src/diffviewer/ydiff.[ch] into project tree
    added entry 'View diff files' into 'Command' menu
    added 'diffviewer' color pairs
    fixed Makefile and configure.am
    added new binding CmdDiffView into '[main]' section
    Big thanx to 'Daniel Borca <dborca@yahoo.com>' for ydiff

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

    Added diffviewer own library

Signed-off-by: Slava Zanko <slavazanko@gmail.com>

    Fixed CFLAGS for diffviewer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>

    changed skins, added section
        [diffviewer]
            added=
            changedline=
            changednew=
            changed=
            removed=
            folder=
            error=

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

Reimplementation of hardcoded shortcuts to keybindings.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-26 11:44:15 +04:00
Andrew Borodin
a78115ad8e Fixed variable declarations and added missing includes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-24 16:22:43 +00:00
Andrew Borodin
45073c35e7 Ticket #1992: incorrect sturtup of MC with some special paths.
Problem description:
  1. Run mc as
     mc /#ftp:user@server
  2. If FTP server asks password, MC shows the password dialog window.
  3. If type the first symbol in input line, MC crashes.

Bug cause:
  MC asks ftp password before initialize of input line keybindings.

Solution:
  Reimplemented MC startup sequence.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-24 16:22:43 +00:00
Andrew Borodin
08b708c5bb Ticket #1940: verbose option cannot be switched off.
How to reproduce:
  1) run mc
  2) press F9
  3) select 'Options' -> 'Configuration...'
  4) switch off '[ ] Verbose operation' option
  5) select '[ Save ]' button and press Enter
  6) in additional, select 'F9' -> 'Options' -> 'Save setup'
  7) exit from mc
  8) run mc again
  9) select 'F9' -> 'Options' -> 'Configuration...'

'Verbose operation' option always switched on.

This commit fixes this behaviour. But in slow terminals,
the value read form ini is forced set to 0.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-22 12:25:08 +03:00
Leonid Myravjev
56d955152c Ticket #1838: source_codepage autodetect with enca program.
Added support of autodetect codepages via 'enca' program.

New parameter in user configuration file (~/.mc/ini):

[Misc]
autodetect_codeset=(one of `enca --list languages | cut -d : -f1`)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>

Little code cleanup.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

Type accuracy. Added missing includes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-08 15:56:48 +02:00
Andrew Borodin
081723c4e7 Removed double check of panel history before show it.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-04 13:42:44 +00:00
Andrew Borodin
ad60c3fd8d Preparation to history cleanup confirmation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-04 13:42:44 +00:00
Andrew Borodin
5718372338 Reimplemented usage of history list in history dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-04 13:42:44 +00:00
Andrew Borodin
1d16fd3a88 Small refactoring of history engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-02-04 13:42:44 +00:00
Slava Zanko
2b653ecf33 Ticket #1991: toggle panels view
Added keybinding for switch panels view (horizontally/vertically).

Default value for keybind is
[main]
CmdTogglePanelsView = alt-comma

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-02-04 11:29:16 +02:00
Andrew Borodin
0bd03e07f5 Ticket #1990: code cleanup before 4.7.0.2 release.
Fixed warings: local variable shadows a global declaration.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-02-02 21:45:05 +03:00
Slava Zanko
862652bd1b Move src/cons.saver into src/consaver/* subdir
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:26 +02:00
Slava Zanko
25155c311a Move all interface includes from subdirs lib/*/*.h into lib/*.h
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:25 +02:00
Slava Zanko
cd4dbf3a09 Changes for build after moving strutil into lib
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:24 +02:00
Slava Zanko
dbaff2b6f6 Reorganization of sources. Part 2
* moved src/fileloc.h into lib/fileloc.h
 * moved src/timefmt.h into lib/timefmt.h
 * removed unneedded includes into src/util.c

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:23 +02:00
Slava Zanko
93dbc46e9c Reorganization of sources. Part 1.
* moved src/global.h into lib/global.h
 * moved glibcompat.[ch] from ./src/ into ./lib/
 * moved fs.h from ./src/ into ./lib/

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:23 +02:00
Slava Zanko
39d5b94cac Reorganized pathes to files in '#include' directives 2010-01-26 10:30:22 +02:00
Slava Zanko
ddb9ada2e8 Changes in sources matched with mass movement of $(srcdir)/src/*/ into $(srcdir)/lib/*/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:22 +02:00
Slava Zanko
43805741aa Changes in sources matched with movement of $(srcdir)/vfs into $(srcdir)/lib/vfs/mc-vfs
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:21 +02:00
Slava Zanko
f90725ad0d Changes in sources matched with movement of $(srcdir)/edit into $(srcdir)/src/editor
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:19 +02:00
Andrew Borodin
1055b85072 Ticket #1918: viewer in QuickView mode corrupts screen.
Initial step: code refactoring:
  * small code formatting;
  * type accuracy;
  * introduce new type 'panel_view_mode_t' for panel type.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-01-06 18:12:53 +03:00
Enrico Weigelt, metux IT service
8c9619cef1 Replaced WITH_SMBFS by ENABLE_VFS_SMB 2010-01-02 16:29:24 +01:00
Enrico Weigelt, metux IT service
ec1a52fb0a VFS: renamed USE_VFS to ENABLE_VFS 2009-12-30 11:06:11 +02:00
Andrew Borodin
4ef67c33b9 No need to call done_menu() at MC exit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-12-16 11:10:42 +02:00