Commit Graph

10621 Commits

Author SHA1 Message Date
Slava Zanko
bbf1f4e857 Moved filemanager-related stuff to src/filemanager directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:32 +03:00
Andrew Borodin
116fdc4220 Init/deinit clean up
...to provide symmetrical usage of init/deinit functions.

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

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
b1bd2e2673 Removed hardcoded actions on ctrl-d and ctrl-h hotkeys. Now these hotkeys defined in keymap file.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
0ef9273598 Changes for avoid compiler warnings
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
08e9759283 Split file src/keybind.[ch] to lib/keybind.[ch] and src/keybind-defaults.[ch].
File src/cmddef.h now merged to lib/keybind.h

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

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
045debaa8a Moved charsets.[ch] from src to lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
dc0a963304 Refactoring: removed unused variable
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
5171b0294e Removed file contrib/dist/mc.qpg.in
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
fcc98371d6 Removed unneded utility mcmfmt
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin
139fdaa6bd History optimization.
Don't create conversion handler for each history line while reading
and saving history.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:31 +03:00
Andrew Borodin
1ae9172d2a Renamed mc_config_direct_set_string() to mc_config_set_string_raw()
... and avoid any string modification before save to ini.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
bbb6233049 Optimization of confguration library: delete extra checks
...and simplified codeset conversion in mc_config_get_string().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
3d92a0846a Menu improvements.
menubar_set_visible(): new function to get rid of menubar_visible global variable
in widgtes library.

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

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
f70e06b37a Optimization of str_msg_term_size().
Use single function to calculate of text lines and columns
because algorithm is the same for all encodings.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
f24dd62dc2 Use str_msg_term_size() instead of msglen()
... because msglen() is not tolerant to multi-byte encodings.
Remove msglen() because it unused now.

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

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
8d1708225c Don't include lib/util.h via lib/global.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
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
141926344d if_link_is_exe() and link_is_dir() now return gboolean
...and link_is_dir() is inline now.

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
Andrew Borodin
011b6670e2 Direct typecasting instead of str_unconst() calls.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Andrew Borodin
9b7601476e Diff viewer fixups.
(dview_status): use str_term_trim() instaed of trim() to trim file name.
(dview_get_title): reimplemented using GString because str_term_trim()
returnes a pointer to internal static buffer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Slava Zanko
96cb95cc95 Code indentation in src/viewer directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:29 +03:00
Slava Zanko
cb4bdfa00d Code indentation in src/editor directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:29 +03:00
Slava Zanko
61345bd8e2 Code indentation in src/consaver directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:47 +03:00
Slava Zanko
1ff8b77f92 Code indentation in src directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:47 +03:00
Slava Zanko
14e958a0a4 Removed unused fsusage.c and fsusage.h
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:47 +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
Slava Zanko
c2754de8aa Code indentation in src directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
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