Commit Graph

2941 Commits

Author SHA1 Message Date
Slava Zanko
f830dcc0a8 Merge commit 'origin/1397_master_broken'
* commit 'origin/1397_master_broken':
  Ticket #1397 (Broken build of project without --enable-charset option)
2009-07-14 13:55:25 +03:00
Ilia Maslakov
d92bbf59b6 Ticket #1403 (segfault mcedit after search)
fix: non redefined cp_source after autocorrect codeset
2009-07-13 19:09:50 +00:00
Ilia Maslakov
59ac0537e6 Ticket #1401 (extension for key sequence in mc.lib)
add needed seq in win.c
    changed algorithm lookup_key
2009-07-13 18:59:28 +00:00
Slava Zanko
a41156c007 Ticket #1397 (Broken build of project without --enable-charset option)
Fixed:
 * Call of str_convert_to_input() now in HAVE_CHARSET block
 * Fixed recoding of search string if charsets in use.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-13 12:53:15 +03:00
Slava Zanko
cf363ad022 Ticket #391 (history is broken).
Reason:
glib ini-function works only with UTF-8 in files. Bug raised if system charset not UTF-8.

Issue:
 * recode to utf-8 before saving values of ini-params and
 * recode from utf-8 after reading values of ini-params

Also fixed:
 * if system codepage is not UTF-8, panelize named is always in utf-8 and seems as non-sense string.
 * Recode panelize command names into system codepage from utf-8
 * global variable utf8_display now initialized in any case (non-relative to ENABLE_CHARSET)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-13 11:53:16 +03:00
Slava Zanko
944d1cf961 Merge branch '393_damn_slow_search_viewer'
* 393_damn_slow_search_viewer:
  Ticket #393 (slow search in viewer)
2009-07-09 09:45:41 +03:00
Slava Zanko
ce1d670972 Ticket #393 (slow search in viewer)
* Replace search prepare algorithm
    * Added function for update search status.
    * Added callback for update search status into external places
    * Added new message box 'Seeking to search result' at end of search process
    * Fixed search in file with different charset.
    * Fixed backward search in nroff'ed text
    * Added named enum for return values of callback functions for search
    * Fixed wrong search with 'pcre' search engine.
    * Fixed search in underlined text.
    * Fixed wrong offset of nroff'ed text where text is underlined.
    * Fixed calculating of next search position. Fixed double-search one text in nroff'ed area.
    * Last found text stay selected if no more found.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-09 09:44:44 +03:00
Patrick Winnertz
944e137123 Merge branch '1391_segfault_on_empty_codepages'
* 1391_segfault_on_empty_codepages:
  Ticket #1391: fill codepages list if mc.charsets file cannot be read.
  Prevent mc from crashing when codepages is empty because of an bogus installation
2009-07-07 19:17:09 +02:00
Slava Zanko
1b03ffad49 Ticket #1396 (need build option --with-search-engine for select regex engine)
Added '--with-search-engine' into configure script.
Changed behavior of lib_pcre m4-module. Now used pkg-config

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-07-07 11:17:10 +03:00
Andrew Borodin
1b4bc8b91d Ticket #1391: fill codepages list if mc.charsets file cannot be read.
If mc.charsets file cannot be read, add default ASCII codepage
to codepages list.
Some code clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-07-07 12:05:57 +04:00
Andrew Borodin
80006e30e3 Fixed memory leak in copy_dir_dir().
Some optimization.
Little code clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-07-03 10:29:57 +04:00
Patrick Winnertz
6cd8c978fe Prevent mc from crashing when codepages is empty because of an bogus installation
Signed-off-by: Patrick Winnertz <winnie@debian.org>
2009-07-01 07:58:58 +02:00
Ilia Maslakov
d205e724f0 Ticket #343 (automatically detect user's charset) reopened
fix: check if mc is run as viewer or editor mode.
fix: little memory leak
fix: dlg_erase now check input parameters
2009-06-30 18:19:05 +00:00
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
Sergei Trofimovich
c07b5efe45 close_error_pipe: return value instead of garbage
Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-26 13:39:47 +03:00
Sergei Trofimovich
e65b0f1986 viewer: Ticket: Viewer(F3) hangups at '.patch' viewing
As stderr closes before process shutdown we get hangup trying to
read last data from stderr. Try to read at least something before closing
stderr.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-26 13:29:05 +03:00
Andrew Borodin
66a15c9163 History: don't drop valid keys after 1st invalid one.
Old behavior: while reading some history from ~/.mc/history file,
the all keys after 1st invalid key are ignored.

New behavior: ignored invlaid keys only. All valid keys are
get.

Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-26 10:16:50 +04:00
Slava Zanko
372d3c6cd3 REBASE: Need to join to previous commit 2009-06-26 10:16:50 +04:00
Slava Zanko
709150fe77 Fixed return value of mc_config_new() function
Also *len parameter always setting up in mc_config_get_keys() and mc_config_get_groups() functions.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-26 10:16:50 +04:00
Andrew Borodin
5a67008194 Ticket #394: handle the empty ~/.mc/history file correctly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-26 10:16:50 +04:00
Andrew Borodin
d5f1442438 Ticket 1375: new design of 'Find File' dialog.
* src/find.c:
  + New design of 'Find File' dialog.
  + odification of search results dialog: listbox
    which contains search results is not scrolled now.
    New behavior avoids dialog blinking :) and allows the walk
    through the list during search.
    Added counter of found items.
  + Check regexp before search.
  + For glib >= 2.14.0, use GQueue for directory queue.
  + Fixed memory leak.
  + Some optimization.
  + More type accuracy.
  + Formatting. Fixed typo. Clean up.

* src/widget.c:
  (listbox_select_by_number): don't operate with non-existing list.

* src/search/*:
  + (mc_search_prepare): new function that allows check if regexp
    is valid before search (Slava Zanko).
  + Removed redundant chek for g_free ().
    Use g_free() instead of free().

Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-25 10:56:16 +04:00
Slava Zanko
105c56fb4d Merge branch 'master' of ssh://www.midnight-commander.org:2222/git/mc
* 'master' of ssh://www.midnight-commander.org:2222/git/mc:
  viewer: Ticket: #410 certain binary treated-as-roff files cause viewer hangup
2009-06-24 12:23:36 +03:00
Slava Zanko
f37120e8fc Copy files/dirs: If 'Preserve attributes' checkbox is unchecked, then permissions of files and dirs will be set relative to current umask
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-23 11:23:19 +03:00
Sergei Trofimovich
40438bfd0f viewer: Ticket: #410 certain binary treated-as-roff files cause viewer hangup
Hangup state:
viewer executes program an checks whether it emits data from stdout
or stderr and receives them via UNIX pipes. Viewer reads stdout
synchronously (fread). Inferior program tries to write large chunk
to stderr when viewer is blocked on stdout read. We get a deadlock:

* viewer is blocked reading from empty nonclosed stdout
* inferior app is blocked by full stderr pipe

To prevent this we close stderr right after first read byte from stdout.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-22 21:16:10 +03:00
Slava Zanko
ce129506f6 Added recognizing of filesystem type and automatically toggle 'on' or 'off' checkbox 'Preserve attributes' in file copy/move dialog 2009-06-22 17:51:43 +03:00
Pavel Tsekov
f856eeb0ea Fix chmod complaints when "preserve attributes" unchecked
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-22 17:51:43 +03:00
Slava Zanko
07f0f92d24 Fixed filter by partial file name. Now filter applied to full filename.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-22 13:55:20 +00:00
Ilia Maslakov
22c875657a Ticket #406 (show filter in panel header)
add: draw filter in panel header near "Name" if format  '''Name [filter]'''
2009-06-22 13:55:20 +00:00
Slava Zanko
b6b446076c Ticket #1366 (shell patterns: '[*' does not mark files started with '[')
Description:
Try to highlight files [1], [2] and [3]:
Gray-+
[* (or \[*)
Enter
Nothing marked

Fix solution:
 * With glob search backshash was escaped. Now this behaviour canceled.
 * Fix escaping of GLOB patterm search string.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-22 13:40:01 +03:00
Ilia Maslakov
a5f4a672f6 Ticket #426 (compilation failure)
fix: fogoten #ifdef HAVE_CHARSET
2009-06-20 16:08:40 +00:00
Andrew Borodin
9c49ffd697 Ticket #424: viewer doesn't apply the file position.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-06-20 17:35:59 +04: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
INode
4a58bd3a14 Ticket #372 (ignores some menu entries)
fix: ignores some (but not all) of menu entries.
2009-06-19 20:09:45 +00:00
Slava Zanko
38601bd224 Removed support of POSIX regexp. Now handled only glib-regexp and pcre
POSIX regexp don't support search by code of character (like \x<HEX>).

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-19 21:47:31 +03:00
Sergei Trofimovich
1b5ae972bb Merge commit 'origin/231_bg_shell_fish_support'
* commit 'origin/231_bg_shell_fish_support':
  Start on fish (Friendly Interactive SHell) support.
2009-06-19 14:27:18 +03:00
Andrew Borodin
68354273a3 Fixed includes.
Added missed includes. Fixed includes after rebase.

Signed-off-by: Andrew Borodin <borodin@borodin.zarya>
2009-06-19 14:36:36 +04:00
Claes Nästén
128160fef1 Start on fish (Friendly Interactive SHell) support.
This code seems to be working good enough to give commands with fish,
however the prompt display is somewhat broken but that happens with bash
as well.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-18 20:08:07 +03:00
Andrew Borodin
26852546b7 vfs/gc.c src/widget.c: removed unneeded #include's.
vfs/vfs-impl.h src/background.h src/charsets.c
src/esc.h src/file.h src/execute.c src/vfsdummy.h: fixed missed #include's.
src/cons.saver.c: include <config.h> unconditionally.
src/complete.c:: fixed #include's.
src/win.h src/win.c: removed unneeded #include's;
check_movement_keys(): fixed type of returned value.
2009-06-18 21:07:10 +04:00
Andrew Borodin
5f61e9aaa4 Fixed missed #include's after rebase to current master. 2009-06-18 21:06:25 +04:00
Andrew Borodin
05c5d16851 ChangeLog: added entry.
src/dialog.h: changed header guard. Added comments.
2009-06-18 21:04:10 +04:00
Enrico Weigelt, metux IT service
b09a107190 further include file fixups 2009-06-18 21:02:29 +04:00
Enrico Weigelt, metux IT service
c7d04dd47a fixed several missing #include's 2009-06-18 21:02:29 +04:00
Slava Zanko
09bb0c5a6d Merge branch '415_trivial_optimization'
* 415_trivial_optimization:
  Ticket #415 (trivial optimization in src/file.c::panel_operate())
2009-06-18 15:53:43 +03:00
Ilia Maslakov
3ce5fb127b Ticket #412 (Exit from mcedit by sequence Esc-Esc-Esc)
fix: Exit from mcedit by sequence Esc-Esc-Esc, now revert to double Esc
2009-06-18 12:09:13 +00:00
Slava Zanko
df256dbaf6 Ticket #415 (trivial optimization in src/file.c::panel_operate())
This patch contains the following trivial optimizations:

 * merged two identical "dest_dir_ = g_strdup (dest_dir)" ops.
 * simplified check for trailing '/' (no need to strcmp 1-char string).
 * since g_free (NULL) is safe, merged two separate "if empty string then bail out" code paths.
 * fixed wording in a comment.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-18 14:51:05 +03:00
Sergei Trofimovich
f4611f3651 Ticket #409: search: build failure on glib <2.14
During constant renaming #ifdef'ed path was broken.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-17 15:52:21 +03:00
Sergei Trofimovich
6ee0ed5750 Ticket #409: search: build failure on glib <2.14
During constant renaming #ifdef'ed path was broken.

Signed-off-by: Sergei Trofimovich <slyfox@inbox.ru>
2009-06-17 15:14:47 +03:00
Slava Zanko
a44141e7a0 Fixed regex search by mask '.*' in multibyte strings (utf-8)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-17 11:39:27 +03:00
Slava Zanko
9dbdac0ad3 Ticket #305 (Extra character on renaming)
Fixed renaming/copying utf-8 filenames and directoryes.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-06-17 11:39:26 +03:00