Commit Graph

684 Commits

Author SHA1 Message Date
Andrew Borodin
bbbb4d6daf Ticket #1378: removed duplication of command line histroy.
Modified histroy_cmd() function: now it shows history of command
line widget, not yet another dialog window.
Modified menu entry.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-27 09:09:01 +04:00
Ilia Maslakov
a5f4a672f6 Ticket #426 (compilation failure)
fix: fogoten #ifdef HAVE_CHARSET
2009-06-20 16:08:40 +00:00
Ilia Maslakov
40558673b6 Ticket #192 (show username+hostname in xterm title)
add: draw [user@hostname] in xterm title
add: pwd.h header into main.c
2009-06-20 12:41:41 +00:00
Ilia Maslakov
d737b9151f Ticket #343 (automatically detect user's charset)
add show warnind dialog if system and display or source codeset are diferent
add global option skip_check_codeset if set then warnind window not show
    set display_codepage, source_codepage = system locale
2009-06-20 12:10:37 +00:00
Andrew Borodin
5f61e9aaa4 Fixed missed #include's after rebase to current master. 2009-06-18 21:06:25 +04:00
Enrico Weigelt, metux IT service
c7d04dd47a fixed several missing #include's 2009-06-18 21:02:29 +04:00
Andrew Borodin
fd09abaeb2 Hide private API of editor (#361).
All editor private API stuff is located now in edit/edit-impl.h.
Public API is located in edit/edit.h.
Added functions to read some fields of WEdit struct.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-16 15:36:45 +04:00
Andrew Borodin
0791b5b200 Revert ""Exit" menu entry have been moved from "File" submenu to "Command" one."
This reverts commit 00497702b78138b888a55eff49fd90d99cb034b4.
2009-06-12 16:12:10 +04:00
Andrew Borodin
4a748afdc0 "Exit" menu entry have been moved from "File" submenu to "Command" one.
Changed hotkey of "Exteranl panelize" menu entry.
2009-06-12 16:12:10 +04:00
Andrew Borodin
5241c7a5d4 src/main.c: don't display "Encoding..." menu entry if charsets support is
disabled.

edit/editmenu.c: edded "Encoding..." menu entry to the "Command" submenu.
Display it if charsets support is enabled.
2009-06-12 16:12:10 +04:00
Andrew Borodin
fb48d4a295 Small reorganization of MC and Editor menus.
The 'User Menu' entry is moved from 'File' submenu to 'Command' one.
The 'Edit editor menu file' and 'Edit syntax file' entries are moved
from main MC menu ('Command' submenu) to editor main menu ('Options'
submenu) and renamed.

src/cmd.c (check_for_default): moved to util.c and maken global.
(menu_edit_cmd): rewritten to handle MC menu files only and renamed
to edit_mc_menu_cmd.
Editor relevant routines are moved to editor code.

src/cmd.h: cleanup.

src/main.c: main menu reorganization.

src/user.h: moved editor macros to edit/edit.h.

src/util.c, src/util.h: check_for_default function from src/cmd.h.
Rewritten to use exist_file() function.

edit/editcmddef.h: added new commands:
CK_Load_Syntax_File and CK_Load_Menu_File.

edit/edit.h: editor file macros from src/user.h.
New type for file which is currently being edited.
Modified edit_load_cmd function to be more advanced.

edit/edit.c (edit_execute_cmd): handle new commands:
CK_Load_Syntax_File and CK_Load_Menu_File.

edit/editmenu.c: menu reorganization: moved two entries here from main
MC menu. Added requireq handle functions. Small optimization: removed
extra layer in menu entry handlers.

edit/editcmd.c: menu and syntax files edit is implemented.
Modified edit_load_cmd function to be more advanced.
2009-06-12 16:12:10 +04:00
Slava Zanko
3b3dbe0f91 Old state of panels now read once from ~/.mc/ini file (if ~/.mc/panels.ini don't exists) 2009-06-01 11:32:19 +03:00
Slava Zanko
a70255f643 Changed all source files for use new config module 2009-06-01 10:55:35 +03:00
Slava Zanko
0c17219b2a Move global config files from pkg_datadir to sysconfdir
* Also fixed 'make dist' command
 * changed contrib/dist/redhat/mc.spec.in for builds with new dir
2009-05-21 01:01:10 +03:00
Sergei Trofimovich
fd55b916de Revert "Replace self-made code for work with ini-files to glib native code"
This reverts commit 4648ad8bf9.
2009-05-19 10:22:24 +03:00
Slava Zanko
4648ad8bf9 Replace self-made code for work with ini-files to glib native code 2009-05-14 16:21:22 +03:00
Ilia Maslakov
f8a487de01 Merge branch '351_show_number_line'
* 351_show_number_line:
  fix hotkey menu entry "Toggle li&ne state" now highlighted "n"
  add call CK_Toggle_Line_State to edit menu
  show line number in left part of screen (hotkey alt-n)
2009-05-14 07:57:51 +00:00
Ilia Maslakov
854f214563 show line number in left part of screen (hotkey alt-n)
add option editor_line_status to ini (src/setup.c)
    add action CK_Toggle_Line_State (edt/editcmddef.h)
    change "print_to_widget()" to show line state, if option_line_state = 1 show line num (edit/editdraw.c)
    change "edit_draw_this_line()", (set line state: line num, etc)
    add const LINE_STATE_WIDTH, add options: option_line_state, option_line_state_width (edit/edit.h)
    add switch on/off show line number (edit/edit.c)
    add CK_Toggle_Line_State to translation table command_names (bindings name is Toggle-Line-State).
    add const LINE_STATE_COLOR for draw left area bar line state
    add color pair "editlinestate" for set in ini
    add help for keyword "editlinestate" on "mc --help-color" (src/main.c)
2009-05-13 07:09:47 +00:00
Slava Zanko
ae46a004e9 Fixed mcfs build failure (after reorganize M4-autoconf stuff)
Defined variable WITH_MCFS renamed to ENABLE_VFS_MCFS for more sence
2009-05-11 10:28:57 +03:00
Slava Zanko
2ebdf91079 Merge branch 'm-utf-8'
* m-utf-8: (223 commits)
  Fix wildcard pattern in file select and file find dialogs
  Project builds with option --disable-charsets
  Deleted build-glib1.sh because glib1 don't work with utf-8
  fix building without --enable-charset
  Total replacement to mc_search stuff in all places
  Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them
  src/view.c: Reworked search stuff to usage src/search
  refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to
  Search engine: development of hex search complete
  Search engine: remove forgotten debug string and reindent file
  Search engine:
  configure.ac: if present glib-2.14 and higher, libpcre don't linked
  Search engine: now used regexp external engines:
  src/find.c: Fixed core dump if content search pattern no present
  edit/editcmd_dialogs.c: fixed state of search type between dialog window calls
  Find files: checkbox 'Regular expression' for content search now default unchecked
  Find files: changes for usage of new search engine:
  Fix copy of current/opposite path to command line: remove charset info from path
  src/Makefile.am: add some header files to Make-tracking
  Fixed editor menu reloading.
2009-05-07 13:01:01 +03:00
Slava Zanko
841a47e163 Fix copy of current/opposite path to command line: remove charset info from path 2009-05-04 12:40:06 +03:00
Andrew Borodin
610d724186 src/main.c (main): create MC home directory with 700 mode instead of 755 one. 2009-05-02 17:29:59 +04:00
Andrew Borodin
ab1bdc1429 src/main.c (main): create MC home directory (~/.mc) if absent. 2009-05-02 17:29:30 +04:00
Slava Zanko
10b7bdb361 Project now build with:
make CFLAGS="-ansi -pedantic -Wall -Wextra -Werror"

WARNING! Builds wuthout samba.
2009-04-24 01:47:22 +03:00
Slava Zanko
540bdb85ed Changes in SelectCodepage dialog:
* Fixed change codepage of panel by hotkey
 * Dialog now show as centered relative to panel, not center of screen
2009-04-21 11:48:13 +03:00
Slava Zanko
b019ea7f9c Add hotkey CTRL+t for change codesets of panels 2009-04-20 16:05:51 +03:00
Ilia Maslakov
df1d805b44 add utf8_display global variable, if display bits select utf-8 utf8_display = 1 2009-04-16 21:22:52 +00:00
Mikhail S. Pobolovets
1959b42fdc Merge branch '252_doxygen_desc_src'
Conflicts:

	src/file.h

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-04-16 08:26:52 +03:00
Ilia Maslakov
3b5e2c052f Merge branch 'utf-8' into master
resolve conflicts:
	configure.ac
	src/complete.c
	src/file.c
	src/layout.c
	src/main.c
	src/menu.c
	src/screen.c
	src/util.c
	src/widget.c
	src/widget.h
2009-04-04 19:50:46 +00:00
Ilia Maslakov
20c769b063 Add stack navigation structure. Add hotkeys A-'-' backward A-'=' forward navigation to files.
add edit/etags.c edit/etags.h
2009-02-25 21:55:35 +00:00
Mikhail S. Pobolovets
758ab591d8 Simple doxygen description for files in src directory.
Mostly \file and \brief tag added.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-02-10 16:07:59 +02:00
Slava Zanko
e54f318cef Completely removed MHL stuff
Changed all source files relative to remove MHL

Some string-related functions moved into src/util.c

This stable fix.
2009-02-06 14:01:28 +02:00
Patrick Winnertz
3b8f37b99e Moved some functions out of mhl into src/util.c
This commit moves the mhl_str_concat_dir_and_file back into src/util.c whitout changing atm the functionality.

Please note that this is an incomplete fix and needs to be partially enhanced in order to keep the full functionality with glib.

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-06 11:17:03 +01:00
Patrick Winnertz
589ffd0b10 Use g_snprintf instead of snprintf as we switch back to glib
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:49:00 +01:00
Patrick Winnertz
d84586ba82 Reverted the use of mhl_str_dup and use g_strdup instead.
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:40:32 +01:00
Patrick Winnertz
1c287d798d First bunch of mhl_mem_free removal patches
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 23:36:58 +01:00
Patrick Winnertz
bbf507b237 Merge branch '161_drop_bundled_slang'
* 161_drop_bundled_slang:
  Removed bundled slang

Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-02-05 10:40:59 +01:00
Enrico Weigelt, metux IT service
8b38cf44da manully merged 227_replace_g_free 2009-02-02 22:34:05 +01:00
Enrico Weigelt, metux IT service
035fa47c06 manually merged 228_replace_g_strdup 2009-02-02 21:28:01 +01:00
Enrico Weigelt, metux IT service
0434e3de5d manually merged 235_remove_g_snprintf 2009-02-02 20:53:03 +01:00
Enrico Weigelt, metux IT service
4f9185a3ee Removed bundled slang 2009-02-02 04:23:06 +01:00
Enrico Weigelt, metux IT service
e4a4f77ac2 replaced g_snprintf() by snprintf() 2009-02-01 20:03:28 +01:00
Sergei Trofimovich
df4129517b Merge branch 'mc-4.6'
* mc-4.6: (38 commits)
  mhl: mhl_shell_unescape_buf(): fixed memory array OOB.
  completion: fixed complete already escaped secuences.
  completion: added changelog entry for solved #147
  completion: fixed completion of escaped commands in commandline
  Removed unused char*.
  mhl: added mhl_strmove() function (memmove semantics)
  completion: added escapes in command line on completion
  complete: cleanup: #define to enum INPUT_COMPLETION_FLAGS
  added a new parameter for completion flags to input_new
  fish: cleanup: unboxed quoted strings when generate shell commands
  introduced new type SHELL_ESCAPED_STR for more type safety
  added mhl/types.h which defines bool enum, escape.h now using this type
  Removed unused variable
  Changes for use MHL.
  Fixed bug with renamig/copying files with backshashes in names
  Remove some testing stuff
  Temporarry commit. Fixed completion in browse by directoryes.
  Fixed some memory leaks.
  Add $ and ` for escaping and reorder it according to the ascii values
  Rewrite it to use g_string_append_c instead of some homebrew stuff
  ...
2009-02-01 14:26:54 +02:00
Sergei Trofimovich
ff4de3d66f Merge branch 'mc-4.6' into 147_escaping
* mc-4.6:
  replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file()
  fixed out-of-tree-builds
  Updated the NEWS file for 4.6.2 and added the bugnumbers behind the items in the list.
  Update for OpenOffice and StarOffice viewer.
  changelog: added entry for python syntax
  syntax: python: keywords update (patch by NNemec) fixes #216
  AC_USE_SYSTEM_EXTENSIONS macro requires autoconf >= 2.60
  po/ru.po: In russian translation, there are some hotkey conficts in menu.
  ChangeLog/NEWS: added entry for #181 ticket (copy to deleted dir)
  Now a trailing slash will only be added in copy & move dialogs if the path itselfs
  copy/move dialog: add trailing '/' to default destination path (fix #181)
  fixed comments to /* ... */
  Not only comment it out but removing it
  Removed unneeded var to make build process a bit cleaner
  Add code snipplet by il.smind which should fix issues with putty and

Conflicts:
	ChangeLog
	mhl/string.h
	src/command.c
	src/complete.c
	src/file.c
	src/util.c
2009-01-31 22:18:19 +02:00
Enrico Weigelt, metux IT service
5f77615b35 Merge commit 'origin/mc-4.6' 2009-01-31 18:20:54 +01:00
Enrico Weigelt, metux IT service
54d6ec88dc replaced buggy concat_dir_and_file() by mhl_str_dir_plus_file() 2009-01-31 16:51:58 +01:00
Enrico Weigelt, metux IT service
f921cc40cd replaced calls to g_strdup() by mhl_str_dup() 2009-01-30 20:10:40 +01:00
Enrico Weigelt, metux IT service
15d7d47c15 replaced g_free() by mhl_mem_free() 2009-01-30 19:28:35 +01:00
Enrico Weigelt, metux IT service
7639b364af added a new parameter for completion flags to input_new 2009-01-29 19:17:43 +01:00
Patrick Winnertz
cad6ffd2bb Merge branch 'mc-4.6' 2009-01-27 23:03:06 +01:00
Patrick Winnertz
ea5cfade55 Add code snipplet by il.smind which should fix issues with putty and
mc (mc over ssh on a putty console)
 - to reproduce try this:
    1) run 'putty'; login to remote host
    2) run mc
    3) press key '/' on keypad. You will see menu that is called when you press the F2
    4) Go to 'Learn keys' (simple call dialog)
    5) just exit from 'learn keys' dialog (without any changes)
    6) 3) press key '/' on keypad again. You will see '/' symbol in command line.
2009-01-26 16:21:06 +01:00
Slava Zanko
8ffa3beeb8 patches by Rostislav Beneš: mc-29-vfs
add support for filesystem, that use others encodings than mc (vfs). Now can be
encoding set only manually, but automatic detection is possible. Filename is
converted in mc_readdir and other function translate it back by vfs_translate
added menu etries encodnig in left and rigth menu (localization will be neede)
modified subshell.c to put subshell correct working directoy,
modified ext.c and execute.c to translate filename before running command
there could be one problem, vfs_translate_path does not use something like
path_magic function
2009-01-26 12:18:16 +02:00
Slava Zanko
77d6ba8a36 patches by Rostislav Beneš: mc-12-menu
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.

now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 12:09:23 +02:00
Slava Zanko
1efbe4a18a patches by Rostislav Beneš: mc-29-vfs
add support for filesystem, that use others encodings than mc (vfs). Now can be
encoding set only manually, but automatic detection is possible. Filename is
converted in mc_readdir and other function translate it back by vfs_translate
added menu etries encodnig in left and rigth menu (localization will be neede)
modified subshell.c to put subshell correct working directoy,
modified ext.c and execute.c to translate filename before running command
there could be one problem, vfs_translate_path does not use something like
path_magic function
2009-01-26 12:04:07 +02:00
Slava Zanko
75cf62902d patches by Rostislav Beneš: mc-28-fix
rest of fixes in files cmc.c, main.c (xterm title), panelize.c, subshell.c,
tree.c, tty.c, user.c, util.c, win.c

now, basic mc's function should work well, editor and view are still broken.
2009-01-26 12:04:07 +02:00
Slava Zanko
4f00496233 patches by Rostislav Beneš: mc-12-menu
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.

now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 11:47:41 +02:00
Slava Zanko
2678e889b1 patches by Rostislav Beneš: mc-01-api
add functions for working with strings
some functions are implemented directlu in strutil.c, others have ascii, 8bit
or utf-8 variant. (8bit means singlebyte encodings, where all characters have
width one). Mc autodetects terminal encoding at start and chooses right
variant. If does not know terminal encoding, chooses ascii variant.

contains functions:
    1. for translation strings and growing strings
    2. for working with characters (next char, prev char, length in
       characters, isspace, isalnum, ...)
    3. prepeare for display, replace invalid characters with questionmark,
       unprintable with dot, left / right / center align
    4. comparing strings

in future all string function from util should be moved into strutil, some
function from util have new variant in strutil.
2009-01-26 11:46:30 +02:00
Patrick Winnertz
881ff40b3d Merge branch 'mc-4.6' 2009-01-26 10:30:14 +01:00
Patrick Winnertz
74dadcc258 Added rev3 of the patch attached to the bugreport 2009-01-26 00:34:50 +01:00
Enrico Weigelt, metux IT service
5d150562aa merged 158_message_codes branch 2009-01-24 04:53:51 +01:00
Patrick Winnertz
aed7edf0f6 Removed some unused vars and functions 2009-01-12 22:47:05 +01:00
Enrico Weigelt, metux IT service
154feb5160 2009-01-10 Enrico Weigelt, metux ITS <weigelt@metux.de>
* edit/editcmd.c:
    * src/achown.c src/background.c src/boxes.c src/chmod.c:
    * src/chown.c src/cmd.c src/command.c src/dir.c src/execute.c:
    * src/ext.c src/file.c src/filegui.c src/find.c src/help.c:
    * src/learn.c src/main.c src/panelize.c src/screen.c:
    * src/selcodepage.c src/subshell.c src/tree.c src/user.c:
    * src/utilunix.c src/view.c:
    * vfs/cpio.c vfs/direntry.c vfs/extfs.c vfs/fish.c vfs/ftpfs.c:
    * vfs/mcfs.c vfs/sfs.c vfs/smbfs.c vfs/tar.c vfs/undelfs.c:
    * vfs/utilvfs.c vfs/vfs.c:

    Changed message type codes on calls to message(), query_dialog(),
    close_error_pipe() from numeric IDs to symbols D_ERROR, D_NORMAL
2009-01-10 14:13:56 +01:00
Slava Zanko
5deebd49a8 remove compatibility_move_mc_files stuff 2009-01-05 00:37:59 +02:00
Roland Illig
bdf23438af mcedit can be invoked with the common filename:lineno syntax. 2008-12-18 12:21:23 +00:00
Pavel Tsekov
2f3df3af4e * edit/bookmark.c: Update copyright notice.
* edit/edit.c: Likewise.
* edit/editcmd.c: Likewise.
* edit/editdraw.c: Likewise.
* edit/editkeys.c: Likewise.
* edit/editlock.c: Likewise.
* edit/editmenu.c: Likewise.
* edit/editoptions.c: Likewise.
* edit/editwidget.c: Likewise.
* edit/syntax.c: Likewise.
* src/background.c: Likewise.
* src/boxes.c: Likewise.
* src/complete.c: Likewise.
* src/execute.c: Likewise.
* src/ext.c: Likewise.
* src/file.c: Likewise.
* src/filegui.c: Likewise.
* src/fileopctx.c: Likewise.
* src/find.c: Likewise.
* src/hotlist.c: Likewise.
* src/key.c: Likewise.
* src/keyxdef.c: Likewise.
* src/layout.c: Likewise.
* src/learn.c: Likewise.
* src/listmode.c: Likewise.
* src/main.c: Likewise.
* src/panelize.c: Likewise.
* src/slint.c: Likewise.
* src/textconf.c: Likewise.
* src/tree.c: Likewise.
* src/treestore.c: Likewise.
* src/tty.c: Likewise.
* src/util.c: Likewise.
* src/utilunix.c: Likewise.
* src/view.c: Likewise.
* src/widget.c: Likewise.
* src/wtools.c: Likewise.
* src/x11conn.c: Likewise.
* vfs/cpio.c: Likewise.
* vfs/extfs.c: Likewise.
* vfs/fish.c: Likewise.
* vfs/ftpfs.c: Likewise.
* vfs/gc.c: Likewise.
* vfs/mcfs.c: Likewise.
* vfs/mcserv.c: Likewise.
* vfs/smbfs.c: Likewise.
* vfs/tar.c: Likewise.
2007-09-25 15:33:35 +00:00
Pavel Tsekov
23361694b6 * src/background.c: Use the correct form of FSF's name in the copyright
notice.
* src/boxes.c: Ditto.
* src/complete.c: Ditto.
* src/execute.c: Ditto.
* src/ext.c: Ditto.
* src/file.c: Ditto.
* src/filegui.c: Ditto.
* src/fileopctx.c: Ditto.
* src/fileopctx.h: Ditto.
* src/find.c: Ditto.
* src/hotlist.c: Ditto.
* src/key.c: Ditto.
* src/keyxdef.c: Ditto.
* src/layout.c: Ditto.
* src/learn.c: Ditto.
* src/listmode.c: Ditto.
* src/main.c: Ditto.
* src/panelize.c: Ditto.
* src/slint.c: Ditto.
* src/textconf.c: Ditto.
* src/tree.c: Ditto.
* src/treestore.c: Ditto.
* src/tty.c: Ditto.
* src/util.c: Ditto.
* src/utilunix.c: Ditto.
* src/view.c: Ditto.
* src/widget.c: Ditto.
* src/wtools.c: Ditto.
* src/x11conn.c: Ditto.
* vfs/cpio.c: Ditto.
* vfs/extfs.c: Ditto.
* vfs/fish.c: Ditto.
* vfs/ftpfs.c: Ditto.
* vfs/gc.c: Ditto.
* vfs/mcfs.c: Ditto.
* vfs/mcserv.c: Ditto.
* vfs/smbfs.c: Ditto.
* vfs/tar.c: Ditto.
* vfs/undelfs.c: Ditto.
* vfs/utilvfs.c: Ditto.
* vfs/vfs.c: Ditto.
* edit/bookmark.c: Ditto.
* edit/edit.c: Ditto.
* edit/edit.h: Ditto.
* edit/editcmd.c: Ditto.
* edit/editdraw.c: Ditto.
* edit/editkeys.c: Ditto.
* edit/editlock.c: Ditto.
* edit/editmenu.c: Ditto.
* edit/editoptions.c: Ditto.
* edit/editwidget.c: Ditto.
* edit/syntax.c: Ditto.
2007-09-24 09:28:32 +00:00
Pavel Tsekov
5d4d2db3f3 * src/main.c (xtoolkit_panel_setup): Remove - it is a noop.
(setup_panels_and_run_mc): Eliminate references to
`xtoolkit_panel_setup'.
2006-09-22 15:14:58 +00:00
Pavel Tsekov
fe251e620a * src/tty.h [USE_NCURSES]: Pull in term.h if WANT_TERM_H is defined.
(tty_tgetstr): Declare new function.
* src/tty.c [USE_NCURSES]: Request the inclusion of term.h.
(tty_tgetstr): Define new function
* src/main.c (init_xterm_support): Use tty_tgetstr().
2006-05-15 13:26:18 +00:00
Pavel Tsekov
dc50393a8f * src/mouse.h (Mouse_Type): Add new enumerated values to describe
the xterm mouse reporting modes offered by various xterm-like
terminals.
* src/mouse.c: Adjust the code to reflect the changes above.
Send the proper terminal control codes when xterm normal mouse
tracking is requested.
* src/main.c (init_xterm_support): Try to fine-tune the mouse tracking
mode based on the terminal type.
2006-03-06 09:28:14 +00:00
Roland Illig
249e1c43e7 * main.c (init_xterm_support): Eterm can handle mouse events, too. 2006-02-04 12:29:30 +00:00
Pavel Tsekov
04000dcf84 * doc/mc.1.in: Update the documentation to reflect the fact that
confirmation may be requested when deleting directory hotlist entries
based on a user configurable setting.
* src/file.h (safe_delete): Move declaration of `safe_delete'
* src/main.h: ... here.
(confirm_directory_hotlist_delete): Declare new global variable.
* src/file.c (safe_delete): Move definition of `safe_delete'
* src/main.c: ... here.
(confirm_directory_hotlist_delete): Define new global variable.
* src/hotlist.c (remove_from_hotlist): Based on a user configurable
setting, request confirmation when removing directory hotlist
entries. The confirmation dialog honours the `Safe delete'
setting.
Reorder the buttons in the hotlist group removal confirmation
dialog so that it becomes consistent with other confirmation
boxes.
* src/setup.c (int_options): Add support for user configurable
confirmation of directory hotlist entries removal.
* src/boxes.c (conf_widgets): Likewise.
(confirm_box): Likewise.
(my_directory_hotlist_delete): New module variable.
2006-01-29 20:26:05 +00:00
Leonard den Ottolander
894b343f90 * main.c (directory_history_add): Fix invalid directory preselection on cd. 2005-11-02 11:50:51 +00:00
Roland Illig
689ee9f8ae * main.c (midnight_callback): Ctrl-space calculates the size of
the currently selected directory entry. This is mostly useful for
	directories.
2005-09-06 11:38:45 +00:00
Roland Illig
0e218318da * cmd.c: Added single_dirsize_cmd(), which computes the size of
the currently selected panel entry and moves down. Suggested by
	ForestCreature on mc-devel.
	* cmd.h: Likewise.
	* main.c (midnight_callback): When the space key is pressed and
	the command line is empty, single_dirsize_cmd() is called.
2005-09-06 06:41:35 +00:00
Roland Illig
4486c5eec2 Replaced const_cast with str_unconst. 2005-09-05 03:20:53 +00:00
Roland Illig
03759c8f34 * main.h: Added const qualifier to the global prompt variable.
* main.c: Likewise.
2005-09-05 02:10:48 +00:00
Roland Illig
c22e826761 Updated German translation. 2005-07-22 21:16:50 +00:00
Roland Illig
1c8c676c76 * key.c: When the command line option -x is given, enable
additional key sequences that are typical for xterms.
	* main.c: First parse command line arguments, then initialize
	key sequences.
2005-07-20 20:29:08 +00:00
Leonard den Ottolander
f10fe35005 * main.[ch], user.c: Fixed a double free in mc_maybe_editor_or_viewer().
Restructured setup_dummy_mc() and expand_format() accordingly.
2005-06-22 21:38:52 +00:00
Leonard den Ottolander
f5dabea2a6 main.c: Also match tabs as empty command. 2005-06-07 20:55:13 +00:00
Leonard den Ottolander
3be17f6657 main.c: Fix blocking of panel cd-ing when there are only spaces on the
command line.
2005-05-29 11:54:22 +00:00
Pavel Roskin
1f60f44145 Update postal address of Free Software Foundation. 2005-05-27 03:35:10 +00:00
Roland Illig
2a21804cc2 * main.h: Changed the type of quiet_quit_cmd() from int to void.
* main.c: Likewise. Removed function cast.
2005-05-23 16:37:01 +00:00
Pavel Roskin
9260860bbf * dialog.c (dlg_select_widget): Remove first argument, it's
redundant.  Adjust all callers.
(dlg_replace_widget): Likewise.
2005-05-20 20:22:06 +00:00
Pavel Roskin
c90d263d2c * .c: Sanitize all calls to functions from ctype.h. Fix gcc 4.0
warnings.
2005-05-11 01:16:58 +00:00
Roland Illig
f9d9f92370 * Removed my own experiments. 2005-02-08 19:59:45 +00:00
Roland Illig
0d08e8308f * Renamed define_label to buttonbar_set_label.
* Renamed define_label_data to buttonbar_set_label_data.
	* Renamed redraw_labels to buttonbar_redraw.
2005-02-08 09:53:51 +00:00
Roland Illig
fc85bdba7e * *.c: Reordered header inclusion. 2005-02-08 09:04:03 +00:00
Andrew V. Samoilov
0464629b20 * main.c (_do_panel_cd): Delete leading spaces from URL
before vfs_translate_url() call.
2005-01-19 06:14:44 +00:00
Andrew V. Samoilov
d50dc18be0 * main.c (midnight_callback): Make the the keystrokes the invoke
select_cmd(), unselect_cmd() and reverse_selection_cmd () work
even if the command prompt is turned off.
2004-11-29 20:11:07 +00:00
Andrew V. Samoilov
b1b4aadcd7 * main.c (print_color_usage): Update list of keywords for global,
menu and help.
	Change my email in ChangeLogs
2004-10-22 05:47:25 +00:00
Roland Illig
8b1e87523a * boxes.c (display_unit): Added const qualifier.
* file.c (check_hardlinks): Likewise.
	* find.c (find_do_view_edit): Likewise. (find_file): Likewise.
	* global.h (home_dir): Likewise.
	* main.c (get_parent_dir_name): Likewise. (init_xterm_support):
	Likewise. (OS_Setup): Likewise.
	* menu.c (create_menu): Likewise.
	* mountlist.c (xatoi): Likewise. (read_filesystem_list): Likewise.
	* poptconfig.c (poptReadDefaultConfig): Likewise.
	* popthelp.c (showHelpIntro): Likewise.
	* rxvt.c (look_for_rxvt_extensions): Likewise.
	* slint.c (has_colors): Likewise.
	* subshell.c (check_sid): Likewise.
	* user.c (check_format_var): Likewise.
	* widget.c (radio_callback): Likewise.
2004-09-25 13:46:23 +00:00
Andrew V. Samoilov
68a7c1dfab * boxes.c (configure_vfs): g_free handles NULL argument too,
no need for the comparison.
        * cmd.c (set_panel_filter_to): Likewise.
            (do_link): Likewise.
            (quick_cd_cmd): Likewise.
        * color.c (done_colors): Likewise.
        * dialog.c (destroy_dlg): Likewise.
        * dir.c (alloc_dir_copy): Likewise.
        * ext.c (flush_extension_file): Likewise.
        * file.c (copy_file_file): Likewise.
            (panel_operate): Likewise.
        * hotlist.c (remove_group): Likewise.
            (remove_from_hotlist): Likewise.
            (done_hotlist): Likewise.
        * main.c (main): Likewise.
        * setup.c (panel_load_setup): Likewise.
        * tree.c (tree_destroy): Likewise.
            (show_tree): Likewise.
        * user.c (user_menu_cmd): Likewise.
        * utilunix.c (i_cache_add): Likewise.
            (putenv): Likewise.
        * view.c (view_done): Likewise.
            (regexp_search): Likewise.
            (normal_search): Likewise.
            (change_viewer): Likewise.
        * widget.c (label_set_text): Likewise.
            (set_label_text): Likewise.
2004-09-24 22:22:35 +00:00
Roland Illig
11842a375f 2004-09-24 Roland Illig <roland.illig@gmx.de>
* boxes.c: Replaced NULL with (char *) NULL. Likewise for 0, where
	NULL was meant.
	* cmd.c: Likewise.
	* dialog.c: Likewise.
	* ext.c: Likewise.
	* file.c: Likewise.
	* find.c: Likewise.
	* hotlist.c: Likewise.
	* learn.c: Likewise.
	* main.c: Likewise.
	* screen.c: Likewise.
	* setup.c: Likewise.
	* treestore.c: Likewise.
	* user.c: Likewise.
	* util.c: Likewise.
	* utilunix.c: Likewise.
	* view.c: Likewise.
	* widget.c: Likewise.
	* wtools.c: Likewise.
2004-09-24 15:05:28 +00:00
Roland Illig
ff7a776535 * main.c (OS_Setup): Fixed segmentation fault.
From Oskar Liljeblad <oskar osk.mine.nu>
2004-09-23 14:07:44 +00:00
Roland Illig
3c6a792d4b * edit/edit.h: renamed edit() to edit_file() to avoid GCC shadow
warnings (many variables are also called edit).
	* edit/editwidget.c: likewise.
	* src/cmd.c: renamed edit() to edit_file() to avoid GCC shadow
	warnings (many variables are also called edit).
	* src/main.c: likewise.
2004-09-19 17:46:39 +00:00
Roland Illig
1d573d9059 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 23:54:47 +00:00
Roland Illig
4baefa09c2 * Code cleanup: Added const qualifier for variables and
function declarations where possible. No functional changes.
2004-08-29 17:15:23 +00:00
Roland Illig
2ebf787653 Renamed version to show_version to avoid name clashes. 2004-08-17 10:40:16 +00:00
Roland Illig
a22afa7a72 Added more const-ness to variables. 2004-08-16 18:31:05 +00:00
Roland Illig
511c710fe6 Added explicit initializers for global variables. 2004-08-16 18:25:16 +00:00
Roland Illig
e0ea1733e3 The type key_callback has got a real prototype. 2004-08-16 04:20:56 +00:00
Roland Illig
a47ff4dece Added missing initializers for poptOption.argDescrip. 2004-08-15 23:06:19 +00:00
Pavel Roskin
4ced5086ac * utilunix.c (canonicalize_pathname): Return void to make it
clear that the conversion is done in place.  Adjust all callers.
2004-01-23 23:53:37 +00:00
Pavel Roskin
4a9c0da0b0 * main.c (midnight_callback): Ctrl-Shift-Enter now copies full
path to the command line, like in Total Commander.
2003-11-14 20:43:11 +00:00
Pavel Roskin
12d78ba8df * boxes.c: Include "../vfs/gc.h" if VFS is used.
* hotlist.c: Likewise.
* key.c: Likewise.
* main.c: Likewise.
* setup.c: Likewise.
2003-11-07 23:50:18 +00:00
Pavel Roskin
0a9c708bec Fixes for bad strings:
"In this cases"
  "~/.netrc file has not correct mode"
Reported by Arpad Biro <biro_arpad@yahoo.com>
2003-11-05 00:33:34 +00:00
Pavel Roskin
0e71b37f2a Don't include background.h if it's not needed.
If needed, add explanation.
2003-10-27 17:36:19 +00:00
Pavel Roskin
24384e9a89 * panel.h: Fix duplication between cpanel and current_panel in
favor of current_panel.  Ditto opanel and other_panel.
2003-10-26 06:45:59 +00:00
Pavel Roskin
bb13ad8db4 * main.c (get_current_panel): Remove.
(get_other_panel): Move ...
* layout.c: ... here.
2003-10-26 06:32:42 +00:00
Pavel Roskin
b6d7cae6d2 * cmd.c: Remove source routing code.
* main.c: Likewise.
2003-10-24 20:10:01 +00:00
Pavel Roskin
9c72f81a21 * chmod.c (stat_file): Eliminate. Use mc_stat().
* chmod.h: Remove unneded code.
* chown.h: Likewise.
* main.c: Include achown.h.
2003-10-24 18:38:02 +00:00
Pavel Roskin
849ef55ae7 * tree.h: Don't include treestore.h. Fix sources to include
treestore.h when needed.
* treestore.h: Eliminate useless typedefs.
2003-10-23 23:57:59 +00:00
Pavel Roskin
1bde2dcbda * main.c (process_args): Use cast to avoid warning. 2003-10-23 19:05:52 +00:00
Pavel Roskin
6bb01bfe85 * main.c (update_one_panel_widget): Use VFS_SETCTL_FLUSH for the
current directory.  This fixes Ctrl-R on fish.
* vfsdummy.h: Remove unused functions.
2003-10-16 18:57:15 +00:00
Pavel Roskin
0636e2ed73 * main.c (process_args): Use VFS_SETCTL_LOGFILE for ftpfs. 2003-10-16 17:13:35 +00:00
Pavel Roskin
0837ed2b49 * cmd.c: Cleanup of unneeded global functions and data.
* color.c: Likewise.
* dir.c: Likewise.
* file.c: Likewise.
* filegui.c: Likewise.
* hotlist.c: Likewise.
* layout.c: Likewise.
* main.c: Likewise.
* panelize.c: Likewise.
* wtools.c: Likewise.
2003-10-14 21:58:56 +00:00
Pavel Roskin
ceaf7af0e0 * main.c (_do_panel_cd): Use vfs_release_path(). 2003-10-11 06:44:54 +00:00
Pavel Roskin
9d1f2aae71 * vfs.c (vfs_type): Rename to vfs_get_class(). Fix prototype to
avoid using internal vfs type.  Adjust all dependencies.
(vfs_rosplit): Rename to _vfs_get_class().
2003-10-11 06:25:29 +00:00
Pavel Roskin
0a3cfe30c3 * background.h: Eliminate background_wait variable. Adjust all
dependencies.
2003-10-08 05:16:58 +00:00
Pavel Roskin
f3bbd7bc5e * main.c (argument_table): Reorder options into logical groups. 2003-10-08 05:06:37 +00:00
Pavel Roskin
e65f371486 * main.c (copy_other_pathname): Trailing slash in not always
inserted when it should be.
2003-09-29 16:38:03 +00:00
Pavel Roskin
8729c81ddc * find.c (find_file): Don't call file_mark(), it would use
uninitialized data.
* main.c (panel_clean_dir): Make panel dirty.
2003-09-22 22:05:27 +00:00
Pavel Roskin
6eda31f362 * menu.h: Return to keeping dialog id instead of a widget
pointer for previous widget.  The widget can be replaced in the
meantime.
* dlg.c (dlg_select_by_id): New function, essentially a cleaner
implementation of dlg_select_nth_widget().
2003-09-13 07:43:20 +00:00
Pavel Roskin
9941a0bb6a * dlg.h: Remove "first" field for dialogs and DLG_HAS_MENUBAR.
* dlg.c (dlg_mouse_event): Remove menubar hack.
* screen.c (do_panel_event): Redirect mouse events on the upper
frame to the menubar if it's invisible.
(panel_event): Don't repaint the panel after redirected events.
2003-09-13 05:23:53 +00:00
Pavel Roskin
c0b34498dd * dlg.h: Merge Widget_Item into Widget. Massive adjustment. 2003-09-12 23:38:42 +00:00
Pavel Roskin
d9292b5524 * main.c (setup_panels_and_run_mc): Use straight widget order in
midnight_dlg.  Select initial panel by dlg_select_widget().
2003-09-12 23:07:09 +00:00
Pavel Roskin
824a5256c1 * menu.h (WMenu): Save pointer to the previous widget, not its
number.  Adjust all dependencies.
* menu.c (menubar_finish): Restore focus on the saved widget.
* dlg.c (dlg_item_number): Remove, it's unused now.
(dlg_select_nth_widget): Likewise.
2003-09-12 22:45:51 +00:00
Pavel Roskin
e14f56d71b * dlg.h: Replace DLG_BACKWARD to DLG_REVERSE with a better
defined meaning.  Make it default to populate dialogs from the
top.  Change all calls to create_dlg().
2003-09-12 21:22:01 +00:00
Pavel Roskin
60dda91b9f * main.c (midnight_callback): Don't redraw dirty panels if the
menubar is active.
2003-09-12 03:14:44 +00:00
Pavel Roskin
738044481c * main.c (menu_cmd): If the current panel is inactive, use the
opposite side to start menu.
2003-09-10 23:37:27 +00:00
Pavel Roskin
109b933235 * screen.c (use_display_format): Set dirty flag. Remove calls
to paint_panel() where they become unneeded.
2003-09-10 05:26:04 +00:00
Pavel Roskin
bab1cfdc49 * screen.c (update_dirty_panels): New function - update panels
with the dirty flag.
(panel_update_contents): Make static, don't call directly.
* main.c: Don't call panel_update_contents(), use dirty flag.
(midnight_callback): Call update_dirty_panels().
2003-09-10 04:42:13 +00:00
Pavel Roskin
13a02ef978 * dlg.h: Use new types for dialog callbacks.
(dlg_cb_fn): Swap msg and parm arguments for consistency with
widget callbacks.  Adjust all dependencies.
2003-09-07 21:24:01 +00:00
Pavel Roskin
39968fa7af * main.c (midnight_callback): Fix for the last commit - repaint
the panel if the search mode is unset.
2003-09-07 06:15:44 +00:00
Pavel Roskin
485bbcef9b * main.c (make_panels_dirty): Remove, it's unneded now.
(midnight_callback): Don't call make_panels_dirty().  Mark
current panel dirty if the search mode is unset.  No need to set
attibutes before calling show_console_contents().
2003-09-07 05:58:55 +00:00
Pavel Roskin
2a60f651e3 * dlg.h: Convert send_idle_msg field to a publicly visible flag
DLG_WANT_IDLE.
* main.c (midnight_callback): Move auto_menu handling to the
handler for DLG_IDLE.
(do_nc): Request idle events.
2003-09-07 05:39:51 +00:00
Pavel Roskin
ac1fd1d878 Remove unused variable stdout_fd. 2003-09-02 22:36:58 +00:00
Pavel Roskin
198e0035e4 * listmode.c: Create all buttons in one place. Remove unneeded
low-level drawing.
(listmode_edit): Return NULL on cancel.
* main.c (listmode_cmd): Actually use the result of
listmode_edit().
2003-09-01 09:03:30 +00:00
Pavel Roskin
fab6e8a493 * widget.h: Completely get rid of tkname. Rename it to histname
for the input widget.  Adjust all dependencies.
2003-09-01 00:18:37 +00:00
Pavel Roskin
8b3b8147d7 * cmd.c (edit_symlink_cmd): Fix possible off-by-one after
readlink().
* file.c (make_symlink): Likewise.
* main.c (copy_readlink): Likewise.
* screen.c (display_mini_info): Likewise.
(chdir_to_readlink): Likewise.
* util.c (resolve_symlinks): Likewise.
2003-08-29 22:45:04 +00:00
Pavel Roskin
4dd13a09ba * dir.h (file_entry): Rename "buf" to "st". Adjust all
dependencies.
2003-08-18 00:47:43 +00:00
Pavel Roskin
ef2c07b7c8 * main.c: Rename PanelMenu to LeftMenu. Don't assume that
LeftMenu and RightMenu are identical.
From Pavel Tsekov <ptsekov@gmx.net>
2003-08-01 20:00:28 +00:00
Pavel Roskin
a1ce20517c * main.c: Make more variables static. 2003-07-28 16:11:44 +00:00
Pavel Roskin
c72a1ea44c Get rid of all references to NATIVE_WIN32. 2003-07-23 03:22:32 +00:00
Pavel Roskin
43bbd6d299 * hotlist.c: Add buttons "Refresh" and "Free VFSs now" to Active
VFS dialog.
(hotlist_button_callback): Handle the buttons.
* main.c: Remove the 'Free VFS now' menu item.
2003-06-29 23:44:39 +00:00
Pavel Roskin
c36bf430bf * text.c: Eliminate. Move colors to color.c and clr_scr() to
layout.c.
* main.c (restore_console): Eliminate, use handle_console().
* Makefile.am: Remove text.c.
2003-06-22 09:32:52 +00:00
Pavel Roskin
e4f7714ab1 * execute.c: New file with all functions for execution and
toggling panels not specific to subshell.
* execute.h: Corresponding header.
* Makefile.am: Adjust for the above.
2003-06-22 09:17:46 +00:00
Pavel Roskin
a568db4228 * main.c (execute): Eliminate. Fix all dependencies.
(shell_execute): Constify string argument.
2003-06-22 08:12:13 +00:00
Pavel Roskin
61ac4d5ca1 * dir.c (do_load_dir): Add new argument "path" to avoid the need
to request the current directory.
(do_reload_dir): Likewise.  Adjust all callers.
2003-06-06 00:52:35 +00:00
Pavel Roskin
12f4a6665a * main.c (directory_history_add): Don't change the directory
passed as the argument, work on a copy.
2003-05-05 15:30:43 +00:00
Pavel Roskin
915136719d * command.c (enter): Check subshell state early and return if
inactive before clearing the command line.
* main.c (force_subshell_execution): Remove magic, unusable,
undocumented command line option "-r".
2003-03-22 05:28:08 +00:00
Pavel Roskin
861deaf09d * subshell.c (init_subshell_child): Set environment variable
MC_SID to the session number of the subshell.
(check_sid): Check that we are not running mc already in the
same session.
* main.c (main): Don't run do_nc() if shutdown was requested.
2003-03-05 20:18:11 +00:00
Pavel Roskin
ff82223a35 Remove references to the archaic "linux" preprocessor definition.
Only __linux__ should be used.
2003-02-27 05:09:35 +00:00
Pavel Roskin
9cf0d2c60f * main.c (do_panel_cd): Record directory history for the panel
that changes the directory, not for the current panel.
2003-02-18 06:43:04 +00:00
Pavel Roskin
f95d276250 * main.c (directory_history_list): Allow history command even
with just one entry - it's more intuitive.
2003-02-18 06:19:11 +00:00
Pavel Roskin
738e33006b * util.c (list_append_unique): New function - add text to GList
and remove duplicates.
* main.c (directory_history_add): Use list_append_unique().
* widget.c (push_history): Likewise.
2003-02-18 06:12:57 +00:00
Pavel Roskin
89e5cc319e * panel.h: Convert directory history to GList.
* widget.h: Convert input history to GList.
Adjust all dependencies.
2003-02-18 05:25:45 +00:00
Pavel Roskin
0f865bcf8f * cmd.c (get_random_hint): Add "force" argument to ignore
timeout.  Adjust all dependencies.
* main.c (load_hint): Likewise.
* layout.c (setup_panels): Force updating the hint bar.
Original patch by Adam Byrtek <alpha@debian.org>
2003-02-05 08:37:21 +00:00
Pavel Roskin
a9440f0320 * main.c (update_xterm_title_path): Use is_printable(). 2003-01-27 17:16:11 +00:00
Pavel Roskin
0105a5a3d2 * cmd.c (view_other_cmd): Update path in the xterm title after
command execution.
* main.c (do_execute): Likewise.
2003-01-23 02:41:49 +00:00
Pavel Roskin
5f63841598 * main.c: Change default value of full_eight_bits to 0 - it's
reported to be broken on many terminals.
2003-01-20 23:45:13 +00:00
Pavel Roskin
f2fb0f85e2 Remove dead code for setting the titlebar. 2002-12-27 23:23:34 +00:00
Pavel Roskin
818d127652 Add comments. 2002-12-26 16:38:25 +00:00
Pavel Roskin
da0c9299ad * main.c (update_xterm_title_path): New function, display
current path in the xterm window title.
(_do_panel_cd): Call update_xterm_title_path().
(done_mc): Remove final message for the titlebar.
* layout.c: Replace "Xterm hintbar" option with more generic
"Xterm window title".  Update all dependencies.
(setup_panels): Call update_xterm_title_path().
2002-12-26 16:10:45 +00:00
Pavel Roskin
3286b6e5e2 * main.c (midnight_callback): Fix the last change, so that plain
Enter is not affected.
2002-12-26 10:57:11 +00:00
Pavel Roskin
befd79dfbc * main.c (copy_prog_name): Make static.
(midnight_callback): Handle both Alt-Enter and Ctrl-Enter before
the widgets, because the input widget interprets them now.
(default_map): Remove Alt-Enter, it's handled elsewhere.
2002-12-26 02:09:41 +00:00
Pavel Roskin
f3ec13cea2 * main.c (init_xterm_support): Revert last change, it doesn't
free all S-Lang memory anyways, but creates portability issues.
2002-12-24 20:22:29 +00:00
Pavel Roskin
47e32ea5a5 * layout.c (init_curses) [HAVE_SLANG]: Don't call
SLtt_get_terminfo(), it's already called in slang_init().
* main.c (init_xterm_support): Free term_entry.
2002-12-24 03:37:34 +00:00
Pavel Roskin
0d0009e263 * key.c (get_modifier): Make static. Return the mc internal
representation, not the Linux console code.
(correct_key_code): Add the modifier, not strip it.
(ctrl_pressed): Remove.  Adjust all dependencies.
2002-12-21 08:43:15 +00:00
Pavel Roskin
325e5af99d * main.c (make_panels_dirty): Preserve the cursor position. 2002-12-19 23:35:39 +00:00
Pavel Roskin
9234b4d8ad Remove some unneeded includes. 2002-12-08 04:16:30 +00:00
Pavel Roskin
b246f3c7ea s/Could not/Cannot/ 2002-12-08 01:12:18 +00:00
Pavel Roskin
1573a9581f * cmd.c (do_edit_at_line): Set line to 0 to allow the editor to
decide if the user cares about the initial line or not.
* main.c: Set edit_one_file_start_line to 0 initially.
2002-12-01 08:18:17 +00:00
Pavel Roskin
c3f5696cca * tree.c: Make struct WTree opaque. Remove "done" flag - it's
broken by design.
(tree_selected_name): New function, return name of the currently
selected entry.  Use it where WTree is opaque.
* boxes.c (tree_callback): Don't check for the "done" flag - it
causes closing the dialog on any key after mouse selection.
2002-11-29 04:55:06 +00:00
Pavel Roskin
c0cd0ff9ec * main.c: Eliminate finish_program variable - mc can now exit
immediately.
2002-11-20 15:54:33 +00:00
Pavel Roskin
7b4387975b * main.c (main): Don't call subshell_get_console_attributes() if
the subshell is disabled from the command line.
2002-11-15 21:41:57 +00:00
Pavel Roskin
5cb2ef30f3 Fix duplicate declarations. 2002-11-15 06:38:55 +00:00
Pavel Roskin
bb71be884a Fix "edit" entries in the "Command" menu. 2002-11-14 23:00:50 +00:00
Pavel Roskin
d4ddbe5148 * cmd.c (menu_edit_cmd): Make static, provide separate functions
without arguments to access it.
* menu.h: Make callfn function without arguments - we are not
using any arguments now.
2002-11-14 06:30:16 +00:00
Pavel Roskin
4af124c573 Include edit.h. 2002-11-13 09:30:57 +00:00
Pavel Roskin
85075934f1 * main.h: Don't check if panel.h was included. Use forward
declaration of WPanel, change prototypes to use struct WPanel.
(midnight_callback): Make static.
2002-11-13 08:32:49 +00:00
Pavel Roskin
1b017c668f * cmd.c (do_view_cmd): Don't take WPanel argument - always use
the current panel.
(view_cmd): Likewise.
(view_file_cmd): Likewise.
(view_simple_cmd): Likewise.
(filtered_view_cmd): Likewise.
(filtered_view_cmd_cpanel): Remove.
(view_panel_cmd): Likewise.
2002-11-13 08:21:45 +00:00
Pavel Roskin
b3ae19dd7d * chmod.c (init_chmod): Make static.
* help.c (quit_cmd): Rename to help_quit_cmd().
(show): Rename to help_show().
* main.c (quit_cmd): Make static.  Return void, not int.
(sort_cmd): Make static.
2002-11-13 04:01:04 +00:00
Pavel Roskin
66f451aac7 * dlg.c (send_message_to): Remove, use send_message() instead.
(send_message): Make inline, remove Dlg_head argument.  Change
all callers.
2002-11-13 02:56:40 +00:00
Pavel Roskin
eb53b3e975 * dlg.c (widget_redraw): Remove.
* widget.c (find_buttonbar): Use find_widget_type().  Make
global.
(define_label): Remove paneletc argument.  Change all callers.
(define_label_data): Likewise.
(redraw_labels): Likewise.  Use find_buttonbar().
* view.c (view_adjust_size): Use find_buttonbar().
2002-11-12 23:33:15 +00:00
Pavel Roskin
b0481b41bf * menu.h: Remove "*" from the definition of the type "Menu"
for consistency with other types.  Change all dependencies.
(menubar_event): Make static.
2002-11-12 21:01:50 +00:00
Pavel Roskin
2538dbfdd3 * file.c (panel_get_file): Make static.
* filegui.h: Eliminate use of WANT_WIDGETS.
* setup.h: Likewise.
* menu.h: Declare struct WMenu.
* main.h: Don't include menu.h, use forward declaration.
2002-11-11 07:35:08 +00:00
Pavel Roskin
db31e4b3c4 * main.c (main): Use O_TRUNC when opening the file to write the
last working directory.  Fix segmentation fault when exiting
while on VFS.
* util.c (mc_mkstemps): Use O_TRUNC to open temporary files.
2002-11-01 20:24:07 +00:00
Pavel Roskin
af687f67c5 * main.c (probably_finish_program): Eliminate.
(handle_args): Use exit code 1 only for errors, 0 for legitimate
options such as "--help".
2002-10-31 06:52:33 +00:00
Pavel Roskin
a04dd8754e * main.c: Option -P takes an argument (output filename) now.
(main): Output the last directory to the specified file.  Don't
output "." is this information is unavailable.
2002-10-31 04:31:52 +00:00
Andrew V. Samoilov
8d3ff7384d * main.c (show_change_notice): Make local variable in main().
(compatibility_move_mc_files): Merge with
do_compatibility_move() and return 1 if moving was done, 0
otherwise.  Move ~/.mc.tree to ~/.mc/Tree.
2002-10-23 09:01:08 +00:00
Pavel Roskin
c39e68b75c * main.c (print_mc_usage): Remove unnecessary newline. 2002-10-21 23:34:02 +00:00
Pavel Roskin
1c099a21ec * main.c (print_mc_usage): Partly revert previous patch -
poptPrintHelp() has side effects and should not be called
inside fprintf(), which can be a macro.
2002-10-21 23:28:33 +00:00
Pavel Roskin
f11fe69fe9 * main.c (print_mc_usage): Use poptSetOtherOptionHelp()
From Andrew V. Samoilov <sav@bcs.zp.ua>
2002-10-21 23:21:24 +00:00
Pavel Roskin
d3f0a2f61b Remove spaces around "Error" and "Warning" together with their translations.
Also remove spaces from "Quit" and "Search", but leave alone the
translations, that already have them without spaces.
2002-10-21 04:13:49 +00:00
Andrew V. Samoilov
2f4a67be36 Remove unused enum.
(do_compatibility_move): Rename ~/.mc.ext to ~/.mc/bindings.
2002-10-17 10:32:36 +00:00
Pavel Roskin
f367374054 Add FIXME. 2002-10-13 23:12:06 +00:00
Pavel Roskin
01d8a125c8 * main.c (print_color_usage): Update list of keywords for file
types.  Add a notice for translators.
2002-10-13 22:57:52 +00:00
Andrew V. Samoilov
ca70ee44c5 * popt.h: Adjust poptHelpOptions[] declaration.
* popthelp.c: Replace POPT_ with _ for visible strings.
(singleOptionHelp): Eliminate format array.
(poptHelpOptions): Make const.
(poptPrintHelp): Return width of left column.

* main.c (print_mc_usage): Use width from poptPrintHelp() for "+number".
2002-10-09 15:27:01 +00:00
Pavel Roskin
da7e82d253 Global removal of RCS Id: flags. 2002-09-26 23:13:45 +00:00
Pavel Roskin
c785d4195b * global.h: Move fcntl.h inclusion here. Define O_BINARY.
* mountlist.c: Remove more includes already handled in global.h.
2002-09-23 06:43:22 +00:00
Pavel Roskin
4085591bd0 * main.c (process_args): Print only data directory and nothing
else for the "-f" argument.
(argument_table): Rename --libdir to --datadir, adjust its
description.
2002-09-22 01:59:37 +00:00
Pavel Roskin
6979a9fddf * Makefile.am: Rename LIBDIR to DATADIR, since it refers to
pkgdatadir now.  Install cons.saver to pkglibdir, pass it to the
compiler as LIBDIR.
* cons.handler.c (handle_console): Use LIBDIR.
* main.c (OS_Setup): Use DATADIR instead of LIBDIR.  Rename
MC_LIBDIR to MC_DATADIR.
2002-09-22 00:13:32 +00:00
Pavel Roskin
b295faf096 * command.c: (command_insert): New function - insert quoted
text into the command line.
* main.c: Use command_insert() instead of stuff().  This ensures
that the names in the command line are quoted.
Reported by Arpad Biro <biro_arpad@yahoo.com>
2002-09-20 19:59:28 +00:00
Pavel Roskin
f6f02a0295 * command.c: Make `command' a standard WInput widget, just
change its callback.  Eliminate input_w().  Adjust all
dependencies.
* widget.c (input_callback): Remove static attribute.
2002-09-20 19:36:55 +00:00
Pavel Roskin
e6003e328f Even better "+number" help - don't depend on the length of _("+number") 2002-09-19 06:52:41 +00:00
Pavel Roskin
dfdb879eb1 * main.c (argument_table): Improve help for "+number" - it has
to be re-translated anyway.
2002-09-19 06:43:06 +00:00
Pavel Roskin
d12a6c2eb6 * main.c (argument_table): Add missing descriptions. 2002-09-19 06:29:25 +00:00
Pavel Roskin
7d2f7d94dd * main.c [NATIVE_WIN32]: Remove -S option, it's useless. 2002-09-19 06:16:42 +00:00
Pavel Roskin
331a4c7bab * main.c (print_mc_usage): Use poptPrintHelp() instead of
manually formatted help text.  Adjust callers to pass popt
context.
2002-09-19 06:03:24 +00:00
Pavel Roskin
c3e1e0e19d * cmd.c (other_symlink_cmd): Remove, this function is
undocumented and poorly implemented.
* main.c: Remove call to other_symlink_cmd() on C-x C-l.
2002-09-18 22:30:48 +00:00
Pavel Roskin
eeea579c19 * main.c: Remove advanced_chfns variable. Adjust all
dependencies.
2002-09-13 16:33:18 +00:00
Andrew V. Samoilov
40c35f02c5 * main.c (process_args) [WITH_SMBFS]: Call smbfs_set_debugf()
for "-l" option.
2002-09-13 10:04:21 +00:00
Pavel Roskin
05af9f14c7 * main.c: Fully remove obsolete "-m" option. 2002-09-13 06:42:03 +00:00
Andrew V. Samoilov
b7cae0c6e2 * main.c [WITH_SMBFS]: Include ../vfs/smbfs.h.
(argument_table) [WITH_SMBFS]: Add -D, --debuglevel option for
smbfs debug level.
(process_args) [WITH_SMBFS]: Handle new -D option.
(print_mc_usage) [WITH_SMBFS]: Describe -D, --debuglevel option.
2002-09-11 10:05:24 +00:00
Pavel Roskin
485b40ac2a * utilunix.c (mc_tmpdir): New function that returns temporary
directory for mc.
* util.c (mc_mkstemps): Use mc_tmpdir().
* main.c (main): Call mc_tmpdir().
2002-09-11 04:58:24 +00:00
Pavel Roskin
ec1b1f9614 Globally replace OS2_NT and _OS_NT with WIN32_NATIVE. 2002-09-10 22:04:11 +00:00
Pavel Roskin
9af6bedb04 * main.c (load_prompt): Don't shorten the prompt if COLS is 8 or
less.
2002-09-10 21:18:11 +00:00
Pavel Roskin
ef9a43a7a3 * tty.h [!HAVE_SLANG]: Remove all slang_* definitions.
* main.c (main) [!HAVE_SLANG]: Don't call slang_shutdown().
* myslang.h: Remove slang_done_screen(), it's unused.
2002-09-08 16:22:54 +00:00
Pavel Roskin
5d2757fb8d * key.c (get_event): Check gpm_fd only if gpm is actually used.
* layout.c (done_screen): Move disable_mouse() call ...
* main.c (done_mc): ... here.
2002-09-08 15:50:02 +00:00
Pavel Roskin
87da6b9f42 * main.c (load_hint): Don't hardcode copyright years. Use a
translated message.
2002-09-05 16:36:43 +00:00
Pavel Roskin
01e2780615 * main.c (midnight_callback): Avoid calling the default DLG_DRAW
handler.  From David Martin <dmartina@excite.com>
2002-09-05 06:59:17 +00:00
Pavel Roskin
206fdf6f1d * global.h: Eliminate xgetch, update all dependencies. 2002-09-03 22:23:27 +00:00
Pavel Roskin
556f733f12 * boxes.c: Fix remaining old-style calls to create_dlg().
* complete.c: Likewise.
* main.c: Likewise.
* view.c: Likewise.
2002-09-03 20:19:22 +00:00
Pavel Roskin
66f37c0af4 * main.c (do_nc): Make midnight_colors[] local to do_nc().
Initialize normal color - it's used by the tree.
* boxes.c (tree_box): Use standard dialog_colors.
* tree.c: Use NORMALC for normal entries.
2002-08-31 05:50:06 +00:00
Pavel Roskin
2adae11aa4 * main.c (init_xterm_support): Force xterm-style screen saving
and no mouse on "cygwin" terminal.
2002-08-26 15:26:38 +00:00
Pavel Roskin
8aa61fffa3 * dlg.h (struct Dlg_head): Fold fields "raw" and "has_menubar"
into one field "flags".  Adjust all dependencies.  Add new flag
DLG_COMPACT.
* wtools.c (dialog_repaint): Draw frame without spaces if
DLG_COMPACT flag is set.
* complete.c (complete_engine): Set DLG_COMPACT.
(query_callback): Use common_dialog_repaint().
2002-08-22 15:34:25 +00:00
Pavel Roskin
608d74abda * menu.c (create_menu): Get help node as an argument.
* main.c: Use new create_menu() interface.
2002-08-20 21:30:06 +00:00
Pavel Roskin
2c8f2419e5 * main.c (handle_args): Set POPT_CONTEXT_NO_EXEC flag for
poptGetContext().
* popt.c: Call abort() in execCommand() - we should not execute
anything here.
2002-08-20 00:01:33 +00:00
Pavel Roskin
342b4bbd0f * cmd.c (fishlink_cmd): Implement user interface for FiSH.
* main.c: Add it to the menu.
2002-08-19 06:06:09 +00:00
Pavel Roskin
0d89dec899 * main.c: Remove extremely unsafe and poorly designed support
for /tmp/mc.$PID.control file.
* util.c (my_putenv): Remove, it's unused now.
2002-08-18 22:31:49 +00:00
Pavel Roskin
69f67049fa * layout.c (init_curses) [!HAVE_SLANG]: Add support for
stickchars - fill acs_map[] with ASCII approximations.
* main.c [!HAVE_SLANG]: Enable --stickchars (-a) for ncurses.
2002-08-18 16:34:29 +00:00
Pavel Roskin
f0dbdeb72e * subshell.c (read_subshell_prompt): Remove argument "how", it's
never set to VISIBLY.  Adjust all dependencies.  Eliminate hack
with "clear_now" - it causes invalid memory access and hides the
real problem.
* util.c (strip_ctrl_codes): Fix possible invalid memory access
if the escape sequence ends unexpectedly.
2002-08-15 06:53:44 +00:00
Pavel Roskin
6d2f235053 * main.c (do_execute) [!HAVE_SUBSHELL_SUPPORT]: Compile fix. 2002-08-15 01:36:09 +00:00
Pavel Roskin
b7cdfa9c93 * main.c (sigchld_handler_no_subshell) [linux]: SIGTSTP is
always defined on Linux.
* subshell.c (sigchld_handler): No need to use SIGTSTP
explicitly when we really care about SIGCONT.
2002-08-09 23:36:06 +00:00
Pavel Roskin
e2a37d3809 * charsets.c: Unconditionally enable finalization code that was
only used with HAVE_MAD.
* color.c: Likewise.
* color.h: Likewise.
* key.c: Likewise.
* main.c: Likewise.
* slint.c: Likewise.
* subshell.c (exit_subshell): Free subshell_prompt.
2002-08-01 20:31:52 +00:00
Pavel Roskin
105cb58726 * mad.c: Remove.
* mad.h: Likewise.
* Makefile.am (SRCS): Remove mad.c and mad.h.
* cmd.c: Remove references to MAD.
* main.c: Likewise.
* dlg.c: Use inline, not INLINE.
* hotlist.c: Likewise.
* menu.c: Likewise.
* global.h: Don't include mad.h.
2002-08-01 19:40:43 +00:00
Pavel Roskin
17ceeead44 * main.c (do_execute): Add newline after "Press any key to
continue".
2002-07-29 19:30:41 +00:00
Pavel Roskin
6bdeafba4d * dlg.c: Eliminate all useless x_* functions.
* dlg.h: Likewise.
* panel.h: Likewise.
* textconf.h: Likewise.
* view.c: Likewise.
* view.h: Likewise.
* widget.c: Likewise.
* main.c: Remove panel_update_marks(). Move try_to_select() ...
* screen.c: ... here.  Eliminate x_* functions.
* main.h: Remove panel_update_marks().
2002-07-19 22:16:24 +00:00
Pavel Roskin
17671c4de9 * main.c (handle_args): Don't call mc_get_current_wd(). 2002-07-19 19:08:26 +00:00
Pavel Roskin
ead99974fb * main.c (directory_history_list): Report error if cannot change
directory.
2002-07-19 05:03:44 +00:00
Pavel Roskin
bb34f88152 * main.c (do_execute): Don't ask to press any key when the shell
is running a command - the user has already pressed Ctrl-O.
2002-07-16 06:00:54 +00:00
Pavel Roskin
a2f136fdc3 s/ommited/omitted/ 2002-07-14 06:36:07 +00:00
Pavel Roskin
74288460f5 * file.c (do_transform_source): Cast the argument to functions
for character classification to unsigned int.
* main.c (handle_args): Likewise.
* util.c (size_trunc_sep): Likewise.
(skip_numbers): Likewise.
2002-07-03 19:47:40 +00:00
Pavel Roskin
a83d080370 * mad.[ch] [__GNUC__] (mad_strconcat): Use macro varargs.
(mad_strdup_printf): Likewise.
(mad_strdup_vprintf): Likewise.
* main.c [HAVE_MAD] (main): Release this_dir and other_dir.
2002-07-03 15:58:54 +00:00
Pavel Roskin
bbbb6eb183 * main.c (stop_dialogs): New function to stop all dialogs.
(quit_cmd_internal): Use stop_dialogs() instead of stopping
midnight_dlg only.  This fixes exit from the shell invoked from
the internal viewer or editor.
2002-07-03 06:19:40 +00:00
Andrew V. Samoilov
f2ea65904e * main.c [HAVE_MAD && !_OS_NT] (main): G_free mc_home. 2002-05-30 13:35:09 +00:00
Andrew V. Samoilov
5a255dd2ea * main.c [!WITH_MCFS] (PanelMenu): Eliminate mcfs related entry.
(RightMenu): Likewise.
* textconf.c (features): Likewise.
* cmd.c (netlink_cmd) [!WITH_MCFS]: Eliminate.
2002-04-19 07:21:09 +00:00
Andrew V. Samoilov
8766ce3b02 * cmd.[ch] [USE_INTERNAL_EDIT] (edit_syntax_cmd:) New dialog
to edit Syntax Highlighting definitions file.
* main.c (CmdMenu) [USE_INTERNAL_EDIT]: Add 'Syntax file edit'
entry.
(process_args): Print mc's library directory to stdout.
2002-03-25 07:46:18 +00:00
Andrew V. Samoilov
fae9735bb9 * textconf.c (version): Write to stdout.
* main.c (print_mc_usage): Add "stream" parameter to specify
file stream.
(process_args): Use print_mc_usage() with stdout as stream.
(handle_args): Use print_mc_usage() with stderr as stream.
(print_color_usage): Write to stdout.
2002-03-20 11:28:08 +00:00
Pavel Roskin
8c9fc66db0 * background.c (background_attention): Cast pointer to long
instead of int because it's unsafe of 64-bit systems.
* main.c (init_xterm_support): Likewise.
2002-02-21 01:49:29 +00:00
Andrew V. Samoilov
455e64673e * main.c (update_one_panel_widget): Call ftpfs_flushdir(). 2002-02-07 19:24:44 +00:00
Pavel Roskin
93fd1572a5 * main.c: Include "drive.h", not <drive.h>, do it after panel.h.
Use _OS_NT as the condition for including drive.h.
* screen.c: Use _OS_NT as the condition for including drive.h.
2002-01-22 00:30:51 +00:00
Pavel Roskin
3a9692b680 * global.h: Provide fallbacks for getuid(), getgid(), geteuid()
and getegid().
* fs.h: Fully trust HAVE_DIRENT_H.
* complete.c: Don't include dirent.h directly, fs.h takes care
of it.
* file.c: Likewise.
* filegui.c: Likewise.
* main.c: Likewise.
* treestore.c: Likewise.
2002-01-21 20:47:05 +00:00
Pavel Roskin
73ed832576 * cmd.c: Remove OS/2 specific code.
* file.c: Likewise.
* main.c: Likewise.
2002-01-17 07:23:50 +00:00
Pavel Roskin
03f801b0f2 * main.c: Remove unused toggle_* functions. 2002-01-17 06:56:22 +00:00
Pavel Roskin
acbe83ef9c * main.c (midnight_callback): Implement "auto menus". 2001-11-29 21:03:16 +00:00
Pavel Roskin
fa89635b51 Fully eliminate all references to HAVE_X and HAVE_GNOME. 2001-11-14 23:20:37 +00:00
Pavel Roskin
b03032c29b * main.c: Remove support for subshell debugging. Firstly, it
was broken.  Secondly, every developer should be able to add
this code when needed.  Finally, there is no need to expose the
option to the user and translate it into 30 languages.
* subshell.h: Remove debug_subshell.
* subshell.c: Likewise.
2001-11-12 22:09:40 +00:00
Andrew V. Samoilov
1cd0a043a7 * charsets.c (load_codepages_list): Use glib memory allocation
functions.
(free_codepages_list) [HAVE_MAD]: New function to release
memory allocated in load_codepages_list.
* charsets.h: Declare free_codepages_list.

* main.c [HAVE_CHARSET]: Include charsets.h.
(main) [HAVE_MAD && HAVE_CHARSET]: Call free_codepages_list.
(program_name): Commented out.
2001-10-29 13:40:00 +00:00
Pavel Roskin
3ab6f77fee * boxes.c (tree): Rename to tree_box() to avoid confusion.
Adjust all callers and headers.
* main.c (tree_box): Rename to tree_box_cmd().
2001-10-01 06:51:15 +00:00
Pavel Roskin
34947b1819 * mouse.h: Major cleanup and interface change. init_mouse()
should only be called once, disable_mouse() and enable_mouse()
should be used later.  Distinguish between disabled and
undetected mouse.  Remove debugging stuff.  Adjust all users.
* mouse.c: Implementation of the above.
* key.c: Don't use gpm_flag - check mouse_enabled instead.
2001-09-17 04:43:58 +00:00
Pavel Roskin
f2e38b2c3a * textconf.h: Get rid of all PORT_HAS_*. Adjust all users.
Continued eliminating GNOME code.
2001-09-16 01:10:09 +00:00
Pavel Roskin
aa50585937 * main.c (init_xterm_support): Don't enable xterm_flag just
because of "kmous" in terminfo.  Setiing this flag means much
more than just mouse support.  Recognize terminals beginning
with "rxvt" and set xterm_flag for them.
2001-09-15 22:59:34 +00:00
Pavel Roskin
e65a82ed06 * cmd.c (view_other_cmd): Don't check use_mouse_p before calling
init_mouse() and shut_mouse(), since those functions decide
themselves what to do.
* layout.c (done_screen): Likewise.
* main.c (setup_mc): Likewise.
* text.c (edition_post_exec): Likewise.
(edition_pre_exec): Likewise.
2001-09-15 21:34:42 +00:00
Pavel Roskin
3051dba20b * mouse.h: Export xmouse_seq.
* mouse.c (init_mouse): Use xmouse_seq instead of hardcoded
xterm mouse sequence.
* main.c (setup_post): Join with setup_mc().
(init_xterm_support): New function.  Check mouse capability.
(OS_Setup): Remove parts that are now in init_xterm_support().
2001-09-15 16:54:40 +00:00
Pavel Roskin
92565a30ba * main.c: Remove old debugging code. Remove external function
declarations.
(menu_bar_event): Remove, it's unused.
* main.h: Declare get_mc_lib_dir() and force_ugly_line_drawing.
* layout.c: Remove all external declarations.
2001-09-08 04:06:03 +00:00
Pavel Roskin
bd5f3b08ae * main.c (main): Call save_stop_handler() - it was ifdef'd out
by error.
2001-09-07 22:37:46 +00:00
Pavel Roskin
482e115e3b * main.c: Remove all GNOME code. 2001-09-07 21:15:04 +00:00
Pavel Roskin
c11389facb * global.h: Include io.h, pwd.h, grp.h and utime.h. Adjust all
sources not to include them and to include global.h at the right
place.
2001-09-07 17:52:19 +00:00
Pavel Roskin
a8ef641beb * x.h: Remove. Adjust all users. Make sure that global.h is
included instead.  Don't include sys/param.h unconditionally -
rely on global.h taking care of it.
* Makefile.in: Remove x.h.
2001-09-03 05:07:40 +00:00
Timur Bakeyev
043e782496 2001-08-31 23:14:21 Timur Bakeyev <mc@bat.ru>
* utilunix.c: init_groups(), destroy_groups(), get_user_permissions()
	rewritten to use GTree structure and functions. Add new static helper
	functions mc_gid_compare() and mc_gid_destroy().

	* util.h: Removed deprecated structure user_in_groups.

	* screen.c: Fixed typo in format report error string.

2001-08-31 23:14:21  Timur Bakeyev <mc@bat.ru>

	* utilunix.c: get_user_rights() renamed into get_user_permissions().
	delete_groups() renamed into destroy_groups().
	* util.h: Likewise.
	* screen.c: Likewise.
	* main.c: Likewise.
2001-09-01 13:47:34 +00:00
Pavel Roskin
d56dd815b1 * main.c (mc_maybe_editor_or_viewer) [!USE_INTERNAL_EDIT]:
Reenable to make "mc -v" possible.
(do_nc): Call mc_maybe_editor_or_viewer() even if the editor
is not compiled in.
(argument_table) [!USE_INTERNAL_EDIT]: Disable "-e".
2001-08-20 05:39:21 +00:00
Pavel Roskin
5215df9192 * main.c (init_sigchld): Disable subshell if SIGCHLD handler
cannot be installed.
2001-08-18 15:18:56 +00:00
Pavel Roskin
99c80d28d9 * main.c (setup_pre) [HAVE_CHARSET]: Fix compilation with
ncurses.
2001-08-15 22:45:20 +00:00
Pavel Roskin
5c428dc7a3 * main.c (do_execute): Don't show prompt if the command is empty
and the subshell is not running.
* view.c (view_handle_key): Add support for Ctrl-O in the viewer.
Suggested by Walery Studennikov <despair@sama.ru>
2001-08-07 16:32:22 +00:00
Pavel Roskin
11fd4abc0e * main.c [HAVE_X]: Disable eight_bit_clean and full_eight_bits.
* util.c (is_printable) [HAVE_X]: Simplify.
2001-07-26 05:01:26 +00:00
Pavel Roskin
57fde54f99 * mad.h: Include stdio.h to prevent redefining mad_tempnam().
* main.c [HAVE_X && HAVE_MAD]: Don't call done_key().
2001-07-16 04:06:35 +00:00
Pavel Roskin
aa9ac05960 * cmd.c [HAVE_X]: Disable source routing dialog and panel
comparison.
* main.c (ctl_x_map): Simplify preprocessor directives.
2001-07-15 04:14:39 +00:00
Pavel Roskin
069eaca778 * screen.c (panel_keymap) [HAVE_X]: Disable Alt-H - it's not
implemented properly for GNOME.
* main.c (directory_history_list) [HAVE_X]: Disable.
2001-07-15 03:50:23 +00:00
Pavel Roskin
9f014513ab * main.c [HAVE_X]: Disable Ctrl-X sequences. 2001-07-14 22:13:46 +00:00
Pavel Roskin
6883eb1dd0 * main.c [HAVE_X]: Eliminate setup_post() and partly done_mc(). 2001-07-14 06:25:45 +00:00
Pavel Roskin
5fd1f032f3 * utilunix.c (uid_cache): Make static.
(gid_cache): Likewise.
(init_uid_gid_cache): Remove.
* main.c (setup_post): Don't call init_uid_gid_cache().
2001-07-14 06:13:29 +00:00
Pavel Roskin
9e7e7037f8 * main.c (default_map) [HAVE_X]: Disable Alt-T.
* cmd.c [HAVE_X]: Eliminate set_basic_panel_listing_to() and
toggle_listing_cmd().
2001-07-14 05:37:27 +00:00
Andrew V. Samoilov
2d7255d8cf * main.c: Eliminate iconify_on_exec.
[!HAVE_GNOME]: Eliminate nowindows, nodesktop, twopanel,
display_linksdir and cmdline_geometry.
(sigchld_handler_no_subshell): Comment fixes.
(midnight_callback): Likewise.
(print_mc_usage): Use fputs, not fprintf.
(print_color_usage): Likewise.
(argument_table): Assign 'r' with force_subshell_execution and 'U'
with use_subshell.
(process_args): Don't deal with 'r', 'U' and 'X' options.
(setup_mc) [HAVE_GNOME]: Eliminate more code.

setup.c (options):  Eliminate iconify_on_exec.
2001-07-11 22:58:32 +00:00
Pavel Roskin
91f2348983 * main.c (sigchld_handler_no_subshell): Don't restart cons.saver
if it died.
* subshell.c (sigchld_handler): Likewise.
2001-07-06 17:29:20 +00:00
Pavel Roskin
1cd140d5dc * main.c (midnight_callback): Don't handle any events except
Ctrl-x combinations on DLG_KEY event if the menu is active.
2001-07-05 23:27:01 +00:00
Pavel Roskin
6c17a59440 * main.c (load_prompt): Don't change prompt if midnight_dlg is
not the current dialog.
2001-07-05 22:35:16 +00:00
Pavel Roskin
5c56eb0c5a * cons.handler.c: Reorganize includes. Fix warnings on BSD.
* rxvt.c (rxvt_extensions): Make static.
* main.c (sigchld_handler_no_subshell) [!__linux__]: Don't try
to restart cons.saver.
* subshell.c (sigchld_handler) [!__linux__]: Likewise.
2001-06-22 23:29:18 +00:00
Pavel Roskin
b3339f9281 * main.c: Remove MenuBarEmpty. From Andrew V. Samoilov. 2001-06-20 17:15:41 +00:00
Pavel Roskin
6ccb2a0131 * setup.c (save_setup) [HAVE_X]: Don't save the [Dirs] section.
(load_setup) [HAVE_X]: Don't load the [Dirs] section.
* main.c [HAVE_X]: Disable other_dir and boot_current_is_left.
Adjust all users.
2001-06-20 15:08:18 +00:00
Pavel Roskin
e470f1d208 * main.c [HAVE_X]: Disable change_panel(),
copy_current_readlink() and copy_other_readlink().
Don't do anything with cmdline and command_prompt.
* screen.c [HAVE_X]: Disable panel_event(), chdir_other_panel()
and chdir_to_readlink(). Adjust all callers.
(panel_key) [HAVE_X]: Don't use command_prompt - always
start search on alphanumeric keys.
* setup.c [HAVE_X]: Disable save_layout(), load_layout(), struct
layout. Adjust all dependencies.
2001-06-19 00:43:56 +00:00
Pavel Roskin
bec643d103 * achown.c: Eliminate untyped declarations.
* boxes.c: Likewise.
* cons.saver.c: Likewise.
* hotlist.c: Likewise.
* panelize.c: Likewise.
* rxvt.c: Likewise.
* main.c: Likewise. Make undeclared functions static.
* treestore.c: Make undeclared functions static.
* view.c: Likewise.
* widget.c: Likewise.
2001-06-14 22:33:00 +00:00
Pavel Roskin
4d15e658d7 * main.c (done_mc) [HAVE_X]: Don't use xterm_flag.
(midnight_callback) [HAVE_X]: Don't handle any keys except
Ctrl-x sequences.
Remove useless preprocessor conditionals.
* win.c [HAVE_X]: Disable unused functions.
2001-06-06 21:41:44 +00:00
Andrew V. Samoilov
71ad50aeca * main.c [HAVE_CHARSET]: Remove source_codepage and display_codepage.
They are declared in selcodepage.c.
* setup.c [USE_VFS]: Remove declarations for variables which are
declared in vfs/ftpfs.c.
(load_setup) [HAVE_CHARSET]: init_printable_table commented
out to enable compilation. Error strings tagged for translation.
(init_setup): Optimized.
2001-06-06 11:52:32 +00:00
Pavel Roskin
cd1fd56223 * boxes.c [HAVE_CHARSET]: New charset selection dialog.
* main.c [HAVE_CHARSET]: Don't use eight_bit_clean and
full_eight_bits. Use source_codepage and display_codepage to
deduce the terminal 8-bitness.
* main.h [HAVE_CHARSET]: Change to match main.c.
* setup.c [HAVE_CHARSET]: Implement saving and loading charset
settings.
* util.c (is_printable) [HAVE_CHARSET]: Use charset settings.
* view.c [HAVE_CHARSET]: Implement charset support.
From Walery Studennikov <hqsoftware@mail.ru>.
2001-06-05 22:49:15 +00:00
Pavel Roskin
72db8e927d * key.c [HAVE_TEXTMODE_X11_SUPPORT]: Rename `display' to
`x11_display' and `w' to `x11_window'. Make them static.
(init_textmode_x11_support): Include into init_key().
(done_textmode_x11_support): Include into done_key().
(k_dispose): Make static.
(s_dispose): Likewise.
* key.h: Remove init_textmode_x11_support() and
done_textmode_x11_support().
* main.c: Don't call init_textmode_x11_support() and
done_textmode_x11_support().
2001-06-05 22:08:31 +00:00
Pavel Roskin
47754df0c4 * cmd.c (free_vfs_now) [HAVE_GNOME]: Eliminate.
(reselect_vfs) [HAVE_GNOME]: Likewise.
* main.c (ctl_x_map) [HAVE_GNOME]: Disable add2hotlist_cmd.
(done_mc) [HAVE_X]: Don't call save_hotlist().
* setup.c (save_setup) [HAVE_X]: Likewise.
(done_setup) [HAVE_X]: Don't call done_hotlist().
2001-06-02 06:52:28 +00:00
Pavel Roskin
429c5fcd58 * hotlist.c [HAVE_X]: Don't use ctrl_pressed().
* widget.c [HAVE_X]: Likewise.
* main.c [HAVE_X]: Likewise. Don't call init_key() and
init_key_input_fd().
* setup.c [HAVE_X]: Remove some variables that make no sence
for the GNOME edition. Eliminate save_panel_types().
* view.c [!PORT_WANTS_VIEW]: Eliminate view_mode_callback().
2001-06-02 01:17:27 +00:00