Commit Graph

2855 Commits

Author SHA1 Message Date
Andrew Borodin
dd319ef92e Fixed file find.
Fixed segfault in file find if MC complied with --disabled-charset.
Fixed wrong search results because of incorrect mc_search_run() argument.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-10 23:21:44 +04:00
Slava Zanko
3708dd28b5 Added new checkbox 'Using shell patterns' into select/unselect dialogs
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-10 14:20:27 +03:00
Slava Zanko
74abbb482f Refactoring: making from anonymous enum new type
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-10 14:20:27 +03:00
Slava Zanko
dbb953bfbe Fixed Select/Unselect file mask. now mask applied to entire filename, not to part of filename
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-10 14:20:27 +03:00
Andrew Borodin
b2a680b768 src/cmd.c (select_unselect_cmd): set dialog sizes using constants
instead of defines.
2009-06-10 14:20:26 +03:00
Andrew Borodin
edc9264a27 Advanced "Select/Unselect Group" dialogs.
src/search/glob.c (mc_search__glob_translate_to_regex): added '^'
and '$' symbols to the begin and end of regex respectively to
properly handle shell-style wildcards.

src/cmd: new select/unselect engine.
(reverse_selection_cmd): invert selection for dirs as for files.

(select_unselect_cmd): new dialog. Added "Case sensitive" and "Files
only" checkboxes.
2009-06-10 14:20:26 +03:00
Slava Zanko
8a3e1a8f5b Fixed broken history of input elements (history wasn't save into ~/.mc/history file)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-10 09:41:28 +03:00
Slava Zanko
f606e64861 Version of project now formed automatically from current git-describe output
* File version.h will be created (or changed) automatically
 * Fixed versions for rpm packages - all '-' changed to '.' in RPM_VERSION variable
 * when version.h is changed (or deleted) ./configure script will be invoked

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-07 00:56:07 +03:00
Iouri Kharon
089cb8f65d This patch correct 'Compare directories' command.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-03 21:43:22 +03: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
e9930f9e28 Changed all source files for use new config module 2009-06-01 11:05:11 +03:00
Slava Zanko
72461d232e mcconfig: added module for work with ini-files 2009-06-01 10:57:44 +03:00
Slava Zanko
0a1b6bfbb2 Reworked "Special dirs"->"list" parameter handle code
misc/mc.lib: changed ',' to ';'
src/treestore.c: use mc_config_get_string_list() function instread of strtok() function
2009-06-01 10:55:35 +03:00
Slava Zanko
acc64ecd68 Fixed saved panel state and fixed reading key definitions from config-file
misc/mc.lib: added escaping of all backslashes
src/mcconfig/common.c: removed forgotten debug code
src/setup.c: fixed non-saving of panels state
2009-06-01 10:55:35 +03:00
Slava Zanko
a70255f643 Changed all source files for use new config module 2009-06-01 10:55:35 +03:00
Slava Zanko
c583b303da Delete src/profile.[ch] files
Also:
 * add check for minimal version of glib (>= 2.6)
 * add subdir src/mcconfig into build action (by make)
2009-06-01 10:55:06 +03:00
Slava Zanko
3de5486aac mcconfig: added module for work with ini-files 2009-06-01 10:55:06 +03:00
Sergei Trofimovich
4ecef05511 completion: do not duplicate non-escaped strings
Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-05-29 15:14:52 +03:00
Sergei Trofimovich
09cdc11c3c str_escape: do not hide error when NULL is escaped
There is many places (esp. completion stuff),
whish does stuff like the following:
char * result
while ( (result = do_stuff (&state)) != NULL) {
   ...
}

Usually do_stuff () uses str_unescape() in function start
and str_escape() at the end. str_escape() hides NULL and
we get endless loop. And g_strdup("") is larger, than NULL :]

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-05-29 15:04:58 +03:00
Slava Zanko
ae96b4dac0 Fixed tab completion (esc-tab) crash.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-05-29 10:28:59 +03:00
Slava Zanko
abcd23406d remove ChangeLog files from mc tree
Description by Sergei Trofimovich:

GNU ChangeLog? files are result of CVS stupidpity about changeset tracking.
Currently constantly updated ChangeLogs? diverge in different branches and cause collisions(!)
when 'git merge' (almost ANY SINGLE MERGE!).

Major changes can be described in NEWS file, minor changes can be autogenerated via 'git log'/'git shortlog'
and friends (if needed at all).
2009-05-27 14:53:23 +03:00
Andrew Borodin
5bc2a579b3 src/cmd.c (select_inselect_cmd): show previous entered text in input line. 2009-05-27 12:49:26 +03:00
Slava Zanko
17343149d6 Remove 'All charsets' checkbox from all search dialogs when specified '--disable-charsets' configure option 2009-05-27 12:20:21 +03:00
Slava Zanko
49015842c9 Fix case insentitive search with --disable-charset configure option
Also, changes 'normal' search engine - now it wrapper for 'regex' search engine
because old engine don't correct work: search by 'test' success on 'test' or 'TEST'
but fail on 'Test' or 'teSt'. New 'normal' engine work correctly.
2009-05-27 12:19:23 +03:00
Slava Zanko
abf38df5e0 src/view.c: fix search result highlighting in backward search. Also fix search results highlight in nroff'ed text 2009-05-27 12:06:13 +03:00
Andrew Borodin
13b12fdd5b src/complete.c:
(filename_completion_function): tilde_expand() returns a new allocated
string, fixed memleak. Formatting. Small optimization. Type accuracy.
Continue at the end of loop is useless, removed.
(username_completion_function): Type accuracy. Formatting. Small
optimization.
(command_completion_function): Type accuracy. Small optimization.
Fixed bug of previous commit: pointer to freed memory was used.
2009-05-27 11:20:48 +03:00
Slava Zanko
1a899905bd Fix usage of shell_[un]escape functions.
These functions returns newly allocated string, but calling don't freeze correctly allocated memory.
2009-05-27 11:20:48 +03:00
Andrew Borodin
92353b3848 Added option to enable/disable close dialog by mouse click outside of it.
Disabled by default. This option is available in ini file only.

setup.h: declare mouse_close_dialog variable.
setup.h: read/write mouse_close_dialog variable from/to ini file.
dialog.c: use mouse_close_dialog variable to control the single left click
outside of dialog.
2009-05-22 16:39:28 +04:00
Andrew Borodin
3be2491d1e src/dialog.c (dlg_mouse_event): close current dialog by mouse click
out of dialog area.
2009-05-22 16:39:28 +04:00
Slava Zanko
28539b2363 Merge branch '130_sysconfdir_mc'
* 130_sysconfdir_mc:
  scripts mc.sh, mc.csh, mc-wrapper.csh and mc-wrapper.sh now install into %{libexec}/mc directory
  edit/syntax.c: fixed path to Syntax file
  Move global config files from pkg_datadir to sysconfdir
2009-05-22 15:44:28 +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
6121dfd5b1 8bit: convert properly nonascii signed chars in panel and viewer (#360)
Problem arose in freebsd-7.2 system. GCC has 'signed char' there
and thus code like this broke:
>     char c = ...;
>     if (isprint(c)) ..." // 'signed char' -> 'signed int'
('man isprint' explicitely says to pass 'unsigned char' there)

As we use multibyte chars everywhere - there is not many places to fix.
This patch fixes all 8bit collate functions.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-05-21 00:49:01 +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
Sergei Trofimovich
df5160aaf3 Revert "Added check for glib version in mc_config_del_param and mc_config_del_group functions"
This reverts commit 483a1a05aa.
2009-05-19 10:22:17 +03:00
Andrew Borodin
c572352a04 Fixed default terminal colors usage for NCurses. 2009-05-15 13:31:23 +03:00
Enrico Weigelt, metux IT service
ae33ec6385 fixed #229 2009-05-15 13:29:48 +03:00
Slava Zanko
483a1a05aa Added check for glib version in mc_config_del_param and mc_config_del_group functions
configure.ac: Added check for minimal version of Glib2

Since Glib2-2.15 API of file-ini module was changed.
Old API:
void g_key_file_remove_key(...)
New API:
gboolean g_key_file_remove_key(...)

Therefore need to check version of Glib and fix return parameter from mc_config_del_param and mc_config_del_group for success build

Work with ini-file added in Glib2 since version 2.6, therefore in configure.ac added this check.
2009-05-14 16:21:28 +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
Mikhail S. Pobolovets
ec8711ca99 Merge branch '350_compare_empty_files' 2009-05-13 14:33:12 +03:00
Slava Zanko
dd27f52286 Merge branch '352_add_XZ_compression_support'
* 352_add_XZ_compression_support:
  Added XZ compression support. Signed-off-by: xgizzmo <xgizzmo@slackbuilds.org>
2009-05-13 11:35:54 +03:00
xgizzmo
24ca27fe30 Added XZ compression support. Signed-off-by: xgizzmo <xgizzmo@slackbuilds.org>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-05-13 11:35:22 +03:00
Sergei Trofimovich
a70a6e278e Merge branch 'mc-4.6'
* mc-4.6:
  commandline: strip_escape: strip xterm OSC commands in $PS1
  src/main.c (main): create MC home directory with 700 mode instead of 755 one.
  src/main.c (main): create MC home directory (~/.mc) if absent.
2009-05-13 10:21:16 +03: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
121ff2965c Merge branch '345_mcfs_build_failure'
* 345_mcfs_build_failure:
  Fixed mcfs build failure (after reorganize M4-autoconf stuff)
2009-05-12 16:27:55 +03:00
Mikhail S. Pobolovets
9041e6c81f commandline: strip_escape: strip xterm OSC commands in $PS1
Correctly deal with prompts like (appear in debian/ubuntu):
  PS1='\[\e]0;\u@\h: \w\a\]\u@\h:\w\$'
  PS1='\[\e]0;\u@\h: \w\e\\\]\u@\h:\w\$'

Based on patch provided provided by Sergey Nizovtsev
    https://bugs.launchpad.net/ubuntu/+source/mc/+bug/330633

Signed-off-by: Sergei Trofimovich <st@anti-virus.by>
2009-05-12 13:27:00 +03:00
Slava Zanko
8c441fdd12 src/cmd.c: Fixed bug was caused by mmap behaviour when length = 0
Here is quote from man(3) mmap:

SUSv3 specifies that mmap() should fail if length is 0. However, in kernels before 2.6.12, mmap()
succeeded in this case: no mapping was created and the call returned addr.
Since kernel 2.6.12, mmap() fails with the error EINVAL for this case.

Thanks to snizovtsev
2009-05-12 10:03:32 +03:00
Mikhail S. Pobolovets
31332a2f00 src/utils.[ch]: _icase_search clean up
_icase_search and icase_search stuff has been removed,
    because it's not used for now (it is also buggy)

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-05-11 11:40:33 +03: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
0a08e13a6c Merge branch '341_broken_file_mark' 2009-05-10 15:10:55 +03:00