Commit Graph

606 Commits

Author SHA1 Message Date
Andrew Borodin
116fdc4220 Init/deinit clean up
...to provide symmetrical usage of init/deinit functions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin
fdb61594df Cleanup of main.[ch].
All file panels related stuff was moved to midnight.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
08e9759283 Split file src/keybind.[ch] to lib/keybind.[ch] and src/keybind-defaults.[ch].
File src/cmddef.h now merged to lib/keybind.h

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:31 +03:00
Slava Zanko
62f3c368c9 Renamed keybind-related functions:
* lookup_action          -> keybind_lookup_action
* lookup_keymap_shortcut -> keybind_lookup_keymap_shortcut
* lookup_keymap_command  -> keybind_lookup_keymap_command

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
045debaa8a Moved charsets.[ch] from src to lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin
3d92a0846a Menu improvements.
menubar_set_visible(): new function to get rid of menubar_visible global variable
in widgtes library.

menu_set_name(): new function to avoid total recreation of main menu
after change panel layout.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
71364f88c3 Split lib/widget/widget.[ch] and lib/widget/wtools.[ch] files
...into small: one widget in one file.
Renamed most if WInput functions.
Minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
8d1708225c Don't include lib/util.h via lib/global.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Slava Zanko
8b018db98f Some WIDGET-related stuff moved to lib/widget directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:30 +03:00
Slava Zanko
1ff8b77f92 Code indentation in src directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:47 +03:00
Andrew Borodin
9b43d71799 Set SLtt_Ignore_Beep in tty_init().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Egmont Koblinger
aa9cb6d320 Ticket #2170: Color collisions
Midnight Commander's color/skin engine often reuses the same color definition for multiple elements on the UI.
This unnecessarily limits the possibilities when playing with colors.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-13 13:21:10 +03:00
Andrew Borodin
ec8d6f0751 Get rid of some '#ifdef ENABLE_VFS' conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:44:20 +04:00
Andrew Borodin
c0384e0b6b When cd to "..", remove encoding at the end of path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:16 +04:00
Andrew Borodin
72ce32f518 Function movements.
The following functions:

directory_history_add
directory_history_next
directory_history_prev
directory_history_list
get_parent_dir_name
_do_panel_cd
do_panel_cd

were moved from main.[ch] to screen.c and panel.h.

Type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-06 15:33:38 +04:00
Andrew Borodin
11c00959f3 Fixup of conditions for networking VFS.
Clean up of code duplicate in configure.ac.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
9b89d60522 VFS: cleaned up smbfs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
67d6ebfd16 VFS: fishfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
05516fbac8 VFS: ftpfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
5df06e7630 VFS: fixups of UNDELFS VFS switch on/off.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Andrew Borodin
9df2f96e75 Some reorginizing of VFS private and public APIs.
Clean up of remained mcfs support.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:49 +04:00
Andrew Borodin
6a55c9320e Ticket #2279: mcserver is deprecated.
Removed mcserver and mcfs support.

Reasons:
(1) no longer builds
(2) no one is willing to support it
(3) possibly contains unfixed security holes
(4) makes no sense in view of the availability of FISH

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 18:36:54 +04:00
Yury V. Zaytsev
3d2c4edd9c Ticket #30: Support for x clipboard (fixup)
Fixed a typo (clipbord -> clipboard) in the code and man pages. Luckily,
mc.ini key name is unaffected.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-07-12 12:55:33 +02:00
Andrew Borodin
21e7453c94 Ticket #1523: added capability to forced run the internal editor.
Added CmdEditForceInternal binding in [main] section
to forced run the internal editor of MC.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-07 13:23:58 +04:00
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