Commit Graph

11221 Commits

Author SHA1 Message Date
Andrew Borodin
16664f9bd0 Added the 'c' hotkey for 'Compile and link current .c file' item of user menu.
Menu item w/o hotey is not shown in menu.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
07612ac7b7 Editor: reduce scope of some functions.
The edit_insert_column_of_text() function is used only in
src/editor/editcmd.c file. Now it is static.

Removed unneeded forward declarations.

Moved static functions to static area in src/editor/editcmd.c

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
4b0032de28 Editor: reduce scope of some functions.
Following fuctions are used in in src/editor/edit.c file only:

edit_print_string
edit_move_block_to_right
edit_move_block_to_left

They was moved from src/editor/editcmd.c into src/editor/edit.c
and made static.

insert_spaces_tab() is used in src/editor/edit.c. Not it is static. Also
some optimization was performed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
8664830831 Editor: reduce scope of some functions.
Following fuctions are used in in src/editor/edit.c file only:

edit_get_byte_ptr
edit_get_buf_ptr
edit_get_prev_utf

Now they are static.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
9ac22ec544 (get_paragraph): fix of pointer difference.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
6ce562381c (load_keymap_from_section): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
6fdf2e6cef (load_keymap_from_section): remove unneeded keybind conversions.
Now the '^' sign can be directly used in keymap files as well
as his name 'caret'.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
ce1249f052 Added percent sign to key names.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
23427deac6 keymap files: unification of Fxx keys: move to lower case.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
cef8eb5cc4 (mc_refresh): moved from lib/widget/wtools.[ch] to lib/widget/dialog-switch.[ch]
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
1c2b3f0da6 Man pages clean up
Removed description of non-existing command in viewer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
7330cd5672 Remove CK_Help action handler in diffviewer
...since it is fully identical with default handler.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
6273917e33 (size_trunc_len): fixed potential integer overflow if SI is used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
6dabcb5f55 VFS small optimization
(vfs_class_data_find_by_handle, vfs_class_find_by_handle): move same
code to the separate function vfs_get_openfile().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
8f4b9e32f1 Remove extra screen update after show help.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
79023b26a4 (mc_build_filename): incorrect processing of first element of path.
If first element is relative, the result path should be also relative
not absolute.

If first element is empty, the result path is relative.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
b63eea10cb (mc_build_filename): fixed incorrect processing of empty paths.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
b61e0fc6a9 (_vfs_get_cwd): fixed memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
1c0e5a4773 Fix potential segfault in term_trim() functions
...if requested width is negative.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Slava Zanko
a1e34b8dfa Code cleanup after runing splint on src/main.c file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-17 13:30:03 +03:00
Andrew Borodin
1e9a3f5d2f Merge branch '2598_u7z'
* 2598_u7z:
  Ticket #2598: u7z: Improve handling of missing p7zip binaries.
2011-10-03 13:54:39 +04:00
Daniel Hahler
4271c184de Ticket #2598: u7z: Improve handling of missing p7zip binaries.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-03 13:39:56 +04:00
Slava Zanko
4a48f5ccaa Merge branch '2621_path_encoding_and_extfs'
* 2621_path_encoding_and_extfs:
  Ticket #2621: VFS extfs: broken navigation in archives if current path is encoded
2011-09-30 12:54:51 +03:00
Slava Zanko
3c25300cd3 Ticket #2621: VFS extfs: broken navigation in archives if current path is encoded
Steps to reproduce:

 * configure & compile mc with '--enable-charset' option;
 * run mc
 * go to dir with any of *.zip, *.rpm, *.deb, *.patch/diff files
 * Change path encoding to any other by pressing ALT+e (selected encoding should be dfferent to system encoding)
 * try to enter to archive

You'll se error message from extfs module.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-30 12:54:10 +03:00
Andrew Borodin
bcd5db8a6a Merge branch '2543_hexview_cursor_position'
* 2543_hexview_cursor_position:
  Fixed positions of text start and hex cursor
  Ticket #2543: Hex viewer mode does not restore cursor position.
2011-09-27 11:18:43 +04:00
Andrew Borodin
b471db4905 Fixed positions of text start and hex cursor
...after switch between plane and hex modes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-23 20:38:50 +04:00
Vitaliy Filippov
6253decba5 Ticket #2543: Hex viewer mode does not restore cursor position.
If you are in hex viewer mode and viewer remembers file positions, the
viewer restores the start position, but does not restore the position
of cursor.
So the restored position is basically useless in hex mode, because when
you move cursor, you go back to the beginning of file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-22 21:29:40 +04:00
Slava Zanko
07c14a4a62 Merge branch '2611_broken_panels_drawing'
* 2611_broken_panels_drawing:
  Ticket #2611: FISH: broken panels drawing after entering password
2011-09-21 10:24:25 +03:00
Slava Zanko
b361722545 Ticket #2611: FISH: broken panels drawing after entering password
Steps to reproduce:
 * run ssh daemon on your host;
 * run mc;
 * type cd sh://127.0.0.1;
 * type your password;
 * just one panel was shown, after pressing ctrl+r second panel will shown as well.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-19 12:53:54 +03:00
Slava Zanko
db9a02fe0e Updated NEWS for 4.8.0-pre2 release
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-12 12:23:48 +03:00
Ilia Maslakov
39b9a2150f Merge branch '2605_fish_get_fix'
* 2605_fish_get_fix:
  Ticket #2605 (FISH: mc hangs while copy lot of small files)
2011-09-12 12:32:14 +04:00
Ilia Maslakov
d6cbefb146 Ticket #2605 (FISH: mc hangs while copy lot of small files)
fixed fish-script 'get'.

    Steps to reproduce:
    create lot of small files
    try to copy these files throught FISH VFS
    mc hangs

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-09-12 11:57:30 +04:00
Slava Zanko
3f816dbb5d Fixed placement for changesetfs and patchsetfs files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-11 12:36:46 +03:00
Andrew Borodin
7b1b0751d6 Updated Russian translation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-11 10:40:32 +04:00
Slava Zanko
4df0e1cfbf Updated NEWS for 4.8.0-pre2 release.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-09 16:30:07 +03:00
Slava Zanko
091a718c4f Update translations from Transifex.net
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-09 16:26:48 +03:00
Slava Zanko
c19da50fe9 Merge branch '2602_cleanup'
* 2602_cleanup:
  (try_complete): fixed warinig:
  (edit_collect_completions): fixed warinig:
  (etags_set_definition_hash): fixed memory leak
  Use ESC_STR macro instead of hardcoded "\033".
  Value accuracy of mouse_enabled global variable.
  Fixed VFS prefix in hints.
  Nice location of red (warning and error) dialogs.
  (dlg_find_by_id): use the GLib way to find widget.
  (move_right): fixed type of return value.
  (menubar_arrange): fixed typos.
  Avoided warning message about non-existent maint/version.sh file
  Minor fixes in NEWS.
  Preventing po/*.po files in git-diff output
  Cleanups and format small fixes in EN and RU man pages.
  Editor: remove unused #define's.
  Optimization of walking in dialog widgets.
  Set logfile for smbfs using mc_setctl().
  (mc_setup_by_args): fixed old VFS prefix.
  (show_datadirs_extended): fixed paths in help message.
  Ticket #2602: cleanup branch
2011-09-09 16:04:42 +03:00
Andrew Borodin
f68b35b475 (try_complete): fixed warinig:
input_complete.c:874:26:  warning: use of logical && with constant
operand; switch to  bitwise & or remove constant
[-Wconstant-logical-operand]
    if (q && q[1] == '(' && INPUT_COMPLETE_COMMANDS)
                         ^  ~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
23ec140834 (edit_collect_completions): fixed warinig:
editcmd.c:1104:42: warning: use of logical && with constant  operand;
switch to bitwise & or remove constant  [-Wconstant-logical-operand]
            if (*num == MAX_WORD_COMPLETIONS && MAX_WORD_COMPLETIONS)
                                             ^  ~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
0274ef4653 (etags_set_definition_hash): fixed memory leak
... and code indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
6c5a679b85 Use ESC_STR macro instead of hardcoded "\033".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
b982f70d4b Value accuracy of mouse_enabled global variable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
8445c885a5 Fixed VFS prefix in hints.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
cd1e5fb76d Nice location of red (warning and error) dialogs.
Now warning/error dialog overlaps the previous status dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
bb8babce1e (dlg_find_by_id): use the GLib way to find widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
829f79c7e7 (move_right): fixed type of return value.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
db2fa05e27 (menubar_arrange): fixed typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Slava Zanko
034633a3c9 Avoided warning message about non-existent maint/version.sh file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-09 12:01:56 +03:00
Andrew Borodin
6ac6a55301 Minor fixes in NEWS.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Slava Zanko
8b217ee306 Preventing po/*.po files in git-diff output
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-09 12:01:55 +03:00