Commit Graph

519 Commits

Author SHA1 Message Date
Andrew Borodin 71364f88c3 Split lib/widget/widget.[ch] and lib/widget/wtools.[ch] files
...into small: one widget in one file.
Renamed most if WInput functions.
Minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin 8d1708225c Don't include lib/util.h via lib/global.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin 7660a8ce66 lib/util.h: deleted unused defines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin 1685730d7c OS-specific defines are moved from lib/util.h into lib/global.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin 50c128a01f is_exe() is inline now.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin d154b0f676 exist_file() is inline now.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin d543be11d9 Use g_file_get_contents() instead of load_file().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Slava Zanko 8b018db98f Some WIDGET-related stuff moved to lib/widget directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:30 +03:00
Andrew Borodin 43ed65e3d9 Moved string-related routines from lib/util.[ch] into lib/strutil.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Andrew Borodin 593157d8cb lib/util.[ch]: removed unused functions.
str_unconst(), trim(), cstrstr() and cstrcasestr() are unused and
removed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Slava Zanko c57566af00 Avoid compiler warnings.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Matthieu Crapet 32a9d93978 VFS: Added 7zr executable detection in u7z
On many distributions by default only the reduced version of p7zip (7zr)
is installed (e.g. on Debian p7zip package provides 7zr executable and
p7zip-full package provides 7za executable).

This patch adds the detection of 7zr in case if 7za is not available.
2010-11-24 10:27:47 +03:00
Andrew Borodin d169d13296 Use str_trunc() directly instead of name_trunc().
name_trunc(): removed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin 53ad349a36 Moved time related stuff from lib/util.[ch] into lib/timefmt.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin 97aa4e99c9 Use g_strndup() directly instead of str_dup_range.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin 8425e6fc71 Moved PATH_MAX definition from lib/util.h into lib/fs.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin 9b43d71799 Set SLtt_Ignore_Beep in tty_init().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin 9ec4d4c08b Check variable before g_array_free() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin 79133154b0 Moved hooks from lib/util.[ch] to new files lib/hook.[ch]
... and renamed Hook to hook_t.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Andrew Borodin 34c1e1a38a Removed unused enum.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Andrew Borodin 5e0c9c911d Moved declaration of "easy_patterns" variable from lib/util.[ch] to src/setup.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Andrew Borodin 1f4efb3a46 (mc_skin_ini_file_load): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Andrew Borodin 1192d34bd1 Clean up some empty lines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Slava Zanko ed566f8971 mc_fhl_init_from_standard_files(): fixed logic and file read order for config files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:20 +03:00
Slava Zanko feb733663f Code indentation in lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:20 +03:00
Andrew Borodin 8ed0510df5 Optimization of mc_fhl_array_free().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:20 +03:00
Andrew Borodin 4892044e71 Remove extra check before mc_search free() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:20 +03:00
Andrew Borodin 4c0ba932a8 Remove extra check before call mc_config_deinit()
...and minor cleanup of related code.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:26:27 +03:00
Andrew Borodin 5324bc63bf (mc_fhl_read_ini_file): conditions cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:26:27 +03:00
Andrew Borodin b8a6d0e27d Grammar.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:26:27 +03:00
Andrew Borodin eea82529d1 Ticket #2409: prepare to the 4.7.5 release.
(mc_fhl_parse_get_extensions): fixed possible memory leak and minor
optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:26:27 +03:00
Andrew Borodin 3e7d76eb13 Ticket #2197: added new color for status bar
...and added missed colors for button bar.

Updated EN and RU man pages.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-22 16:07:17 +03:00
Andrew Borodin 5468707bc6 Added comment for translators about "at sign" symbol.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-02 13:34:08 +03:00
Andrew Borodin 0908c8baea Ticket #2404: added forgotten shotrcuts of mcedit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 21:31:24 +03:00
Andrew Borodin 54a9e72250 Some optimization of loops in translation functions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:48:39 +02:00
Andrew Borodin b6fd832a8a Create strings with small preallocated sizes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:48:39 +02:00
Andrew Borodin 69cebb9984 mc_search__cond_struct_new_regex_ci_str(): get rid of extra string duplication.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-01 15:48:38 +02:00
Andrew Borodin 5cac8caabe Minor optimization of translation function arguments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:48:38 +02:00
Slava Zanko 601047b6a1 Avoid extra-allocation of string while prepare to regexp-search.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-01 15:48:38 +02:00
Slava Zanko 8d59d66188 Removed mc_search_cond_t->len (used mc_search_cond_t->str->len instead).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-01 15:48:38 +02:00
Slava Zanko 863f1ec174 Fixed bit operations in mc_search_regex__process_append_str()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-01 15:48:38 +02:00
Slava Zanko 3934c6fb8e Ticket #2396 (Find File "Whole words" search bug)
when searching in files for non english word with "Whole words" set "on" - then nothig will be found
try search word: "время" and also "time" in next example:

'time'
Время
'Time'
'время'

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:48:38 +02:00
Andrew Borodin 4aec2187e1 Ticket #1894: sort order should not mix hidden files with others.
In case sensitive sort, the order of files and directories is following:
hidden dirs
dirs
hidden files
files

In case insensitive mode, directories are mixed and files are mixed too:
dirs (hidden and not are mixed)
files (hidden and not are mixed).

This commit defines the sort order independently of case sensitivity:
hidden dirs
dirs
hidden files
files

Files in UTF-8 locale require special handling: leading dot must not be
processed in g_utf8_casefold() funcion.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:02:57 +03:00
Andrew Borodin 8f54b9b0b5 lib/lock.c: applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 13:54:39 +03:00
Andrew Borodin 533567c1a7 Expand tilde while locking and unlocking files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 13:54:39 +03:00
Ilia Maslakov 88dc2e93bd replace print_vfs_message to printf
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-10-27 18:12:02 +04:00
Andrew Borodin 8be556abc5 Declarations of use_dash() and rotate_dash() were moved form lib/util.h to src/layout.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-27 18:10:50 +04:00
Ilia Maslakov 8b46518619 Apply code identation policy.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-10-27 18:10:50 +04:00
Andrew Borodin 0a5f93eeb5 fish.c: some fixups.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-27 18:10:50 +04:00
Ilia Maslakov 3cef64306e Split function fish_open_archive_int() to fish_open_archive_pipeopen() and fish_open_archive_talk().
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-10-27 18:10:50 +04:00