Commit Graph

4039 Commits

Author SHA1 Message Date
Andrew Borodin
fe2c50cc19 Ticket 2356: viewer segfaults on ARM platform because type mismatches of printf arguments.
Fixed type mismatches of printf arguments in viewer;

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-11 11:00:29 +03:00
Slava Zanko
89b905d83b Added doxygen documentation for touched functions.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-10-11 10:39:37 +03:00
Slava Zanko
a8aa5cf678 Added definition MC_MAXFILENAMELEN for specify maximum file lenght.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-10-11 10:38:30 +03:00
Andrew Borodin
504bd05729 Ticket #2365: enhancement of quick search.
Double pressing of C-s runs the quick search using previous search pattern.

Usage example:

1. Press C-s
2. Make quick search with some pattern.
3. Stop quick search with any way.
4. Press C-s. The empty search line will be shown.
5. Press C-s again. The previous pattern will be shown and will be used
in current quick search.

English and Russian man pages are updated.

Thanks Alexey Losich (E.L.K) for the initial patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-11 10:38:29 +03:00
Andrew Borodin
7f119ffbbc Ticket #1785: fix of editor default color usage.
(this_try_alloc_color_pair): if foreground and background editor colors
are undefined in syntax, the NORMAL_COLOR is used. This is wrong.
EDITOR_NORMAL_COLOR mut be used instead.

(edit_status): cleanup: remove useless color change.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-06 12:15:45 +03:00
Andrew Borodin
329f473d32 Highlight selected item of WRadio using widget width not item width.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-28 20:51:57 +04:00
Andrew Borodin
64b126fabf Ticket #2362: width of WCheck and WRadio widgets are initialized incorrectly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-28 20:51:57 +04:00
Ilia Maslakov
3013a364b0 Merge commit 'origin/2287_persistent_bookmarks'
* commit 'origin/2287_persistent_bookmarks':
  Fix in lib/logging.c for proper work on 64-bit platforms.
  Change of bookmark drawing.
  Fixed memory leak: destroy serialization bookmarks if file position is not saved.
  Use GArray for bookmarks instead of raw array.
  Minor optimization, type accuracy, includes fix.
  Ticket #2287 (mcedit: persistent bookmarks)
2010-09-28 18:33:53 +04:00
Ilia Maslakov
0c7f4c2494 Change of bookmark drawing.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-09-28 14:12:32 +04:00
Andrew Borodin
34bee19937 Fixed memory leak: destroy serialization bookmarks if file position is not saved.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-28 14:12:28 +04:00
Andrew Borodin
ec8d6f0751 Get rid of some '#ifdef ENABLE_VFS' conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:44:20 +04:00
Andrew Borodin
c36a810c09 Fix of file panel encoding change w/o VFS support.
Now --disable-vfs doesn't mean the total disabling of VFS.
With --disable-vfs option, the localfs module is built
to use the change of file panel encoding.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:43:43 +04:00
Slava Zanko
ac85fdd350 Minor changes: added doxy-comments for functions:
- is_supported_encoding();
- panel_new();
- panel_new_with_dir();
- panel_change_encoding().

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-09-27 21:35:11 +04:00
Andrew Borodin
5007553299 Remove only supported encodings from path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:34:40 +04:00
Andrew Borodin
2a47d77351 Don't add current encoding to path again.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:16 +04:00
Andrew Borodin
aff8e42d64 Created macro VFS_ENCODING_PREFIX for "#enc:" encoding prefix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:16 +04:00
Andrew Borodin
c0384e0b6b When cd to "..", remove encoding at the end of path.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:16 +04:00
Andrew Borodin
f7ee6f8cf2 Added codepage member to the WPanel struct.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:16 +04:00
Andrew Borodin
9b51fcc0fa Minor optimization of panel_new_with_dir().
Type/value accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:16 +04:00
Andrew Borodin
3a11b04ef3 Load codepage list before loading of configuration.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:15 +04:00
Andrew Borodin
51b14f2b7b Don't push directory to history twice. Unified error message.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:15 +04:00
Andrew Borodin
dfbe1130d5 Ticket #1512: panel encoding is not shown correctly in "Choose codepage" dialog.
Initial step: renamed set_panel_encoding() to panel_change_encoding().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-27 21:33:15 +04:00
Andrew Borodin
e35af3c735 Ticket #2350: show numbers for all Fx keys as for enabled as for disabled.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-20 19:45:35 +04:00
Andrew Borodin
6cfefe7cb7 Ticket #1490: fix of mult-screen engine.
Multi-screen engine doesn't handle correctly some cases.
Example:
1. Run mc.
2. Open some file in internal editor.
3. Switch back to the file panels.
4. Open another file in internal editor. As a result, two editors are opened.
5. Close current editor. Now you are in file panels.
6. Run screen list dialog (Meta-`).
6a. The 1st editor is highlighted as current screen. This is wrong.
Current screen is file panels.
6b. Cannot switch to the opened editor in this dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-20 19:44:03 +04:00
Andrew Borodin
ed18e2d093 Use GArray for bookmarks instead of raw array.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-17 17:13:10 +04:00
Andrew Borodin
3af16693e2 Minor optimization, type accuracy, includes fix.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-17 17:13:09 +04:00
Filip Sefrna
a4651d8d2b Ticket #2287 (mcedit: persistent bookmarks)
Save bookmarks of internal edit in filepos

Signed-off-by: Filip Sefrna <fsefrna@gmail.com>

Type accuracy.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-09-17 17:13:09 +04:00
Andrew Borodin
4a52b64088 Merge branch '2333_hangup_after_exit'
* 2333_hangup_after_exit:
  Ticket #2333: MC hangs after exit
2010-09-14 17:05:58 +04:00
Andrew Borodin
cde7a850d5 Ticket #2333: MC hangs after exit
On some FreeBSD servers with tcsh shell the following bug occurs
sometimes: trying to exit from mc it hangs. More detail:
1. run mc, press F10, press Enter - hangs
2. run mc, press F10, choose Command->File->Exit - NOT hangs.

This hang up is a result of subshell_chdir() call after subshell
close (after exit_subshell() call). When the F10 key is handled in
dlg_try_hotkey() function, the do_select_widget() is called. As a
result, the WIDGET_FOCUS message is sent to the active panel and panel
calls subshell_chdir(). But subshell is already closed at this
moment and midnight_dlg is in DLG_CLOSED state.

The solution: don't send DLG_DRAW, DLG_FOCUS and DLG_UNFOCUS messages to
the inactive dialog (that is not in DLG_ACTIVE state). Since dialog is
about destroying (in DLG_CLOSED state) or not visible in screen (in
DLG_SUSPENDED state) it is not needed in any visual changes.

Thanks Tempread for investigation of the problem root.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-14 15:56:03 +04:00
Yury V. Zaytsev
73ee1d04d3 Ticket #2344: Fix line jump when started as editor
Two common line jump protocols supported by mc are:

    * mcedit +lineno file
    * mcedit file:lineno

Unfortunately, in the implementation of the first protocol, if line
number equals to zero, which is often used to position the cursor at the
beginning of the file, it is completely ignored and file "+0" is opened
instead.

This patch fixes aforementioned issue.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-09-09 10:29:32 +02:00
Yury V. Zaytsev
acda372b4c Fixed a typo and bad grammar in man2hlp.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-09-06 17:37:28 +03:00
Sven Wegener
436af5f1ce Ticket #2337: Check for inode count instead of block count
This correctly prevents division by zero.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-06 15:33:38 +04:00
Andrew Borodin
9f702e82ef Fixed formatting after autoformatting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-06 15:33:38 +04:00
Andrew Borodin
e967125920 Don't reset use_subshell variable twice.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-06 15:33:38 +04:00
Andrew Borodin
72ce32f518 Function movements.
The following functions:

directory_history_add
directory_history_next
directory_history_prev
directory_history_list
get_parent_dir_name
_do_panel_cd
do_panel_cd

were moved from main.[ch] to screen.c and panel.h.

Type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-06 15:33:38 +04:00
Andrew Borodin
d5447550f6 Removed panel command wrappers.
These functions were used before implementation of panel key bindings.
Now these wrappers are unneded.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-06 15:33:38 +04:00
Andrew Borodin
74326ecbdc Ticket #2316: code cleanup before 4.7.4 release.
Fixed hotkey confilct in 'Confirmation' dialog window.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-06 15:33:38 +04:00
Andrew Borodin
37b49b3920 Ticket #2324: fix of manually changing syntax definition.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-09-06 13:17:52 +04:00
Andrew Borodin
6598729ce5 Ticket #2320: fixed regexp replacement in editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-06 13:08:21 +04:00
Ilia Maslakov
c17826876c Ticket #2277 (mcdiff cleanup)
mcdiff: some warnings fixed.

    search.c: In function ‘mcdiffview_do_search_backward’:
    search.c:183: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

    ydiff.c: In function ‘cvt_fget’:
    ydiff.c:1653: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

    ydiff.c: In function ‘dview_execute_cmd’:
    ydiff.c:3085: warning: overflow in implicit constant conversion [-Woverflow]

    fixed mcdiff search.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-09-03 17:33:59 +00:00
Andrew Borodin
62052016a5 Ticket #2311: reimplementation of editor 'About' window.
mcedit version number and button are centered now in 'About' window.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-03 19:37:20 +04:00
Andrew Borodin
67e61510b4 Added bindings for vertical scrolling of interactive help.
check_movement_keys() function is not used now in interactive help.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-01 15:25:59 +04:00
Andrew Borodin
b470fb81ce check_movement_keys() function is not used now in viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-01 15:25:59 +04:00
Andrew Borodin
61179c8477 Fixed movement to the bottom of file in viewer in hex mode.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-01 15:25:59 +04:00
Andrew Borodin
6b4914b46e Ticket #212: replacement of hardcoded keys in viewer and interactive help.
Added new viewer keybindings instaed of hardcoded keys:
 - for move to top and bottom of file;
 - for horizontal scroll by 10 columns.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-01 15:25:58 +04:00
Andrew Borodin
44d07b20ab Implementation of keybindings for WListbox.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-01 15:20:28 +04:00
Andrew Borodin
2f62fadabb Ticket #212: implemented keybindings for WListbox widget.
Initial step: added description for A1 and C1 keys.
A1 and C1 keybindings are applied to WTree, WInput and WPanel widgets.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-09-01 15:20:27 +04:00
Andrew Borodin
460311c7c7 Fixed memory leaks after history show.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-08-11 21:33:59 +04:00
Andrew Borodin
5cccff75fb Ticket #2299: history can be shown incorrectly due to access to the invalid pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-08-11 21:33:59 +04:00
Andrew Borodin
4c505ff791 Ticket #2189: use MC version as a version of MCEdit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-30 19:12:08 +04:00
Andrew Borodin
11c00959f3 Fixup of conditions for networking VFS.
Clean up of code duplicate in configure.ac.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
9b89d60522 VFS: cleaned up smbfs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
67d6ebfd16 VFS: fishfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
05516fbac8 VFS: ftpfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
bc1de7cd78 VFS: extfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
6f289617d2 VFS: sfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
f33f7a5031 VFS: tarfs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
19390ab2d7 VFS: cpiofs can now be switched off
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Enrico Weigelt, metux IT service
5df06e7630 VFS: fixups of UNDELFS VFS switch on/off.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:50 +04:00
Andrew Borodin
9df2f96e75 Some reorginizing of VFS private and public APIs.
Clean up of remained mcfs support.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:49 +04:00
Andrew Borodin
57281c6e0b Added type for VFS class flags.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-21 16:43:49 +04:00
Andrew Borodin
11e335cdba Minor cleanup of replace conversion functions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-19 21:05:21 +04:00
Andrew Borodin
49f70b5339 Ticket #2272: fixed segfault in replace confirmation in editor.
Editor segfaults after pressing Skip or Cancel button in 'Confirm
replace' dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-19 21:05:21 +04:00
Andrew Borodin
502a28d79a Ticket #2271: fixed i18n in Confirmation dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-19 16:36:10 +04:00
Andrew Borodin
6a55c9320e Ticket #2279: mcserver is deprecated.
Removed mcserver and mcfs support.

Reasons:
(1) no longer builds
(2) no one is willing to support it
(3) possibly contains unfixed security holes
(4) makes no sense in view of the availability of FISH

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 18:36:54 +04:00
Andrew Borodin
65ce1e179a Visual improvements of 'Virtual File System Setting' dialog.
Now 'Virtual File System Setting' dialog shows enabled/disabled input line
for ftp proxy in depend of 'Always use ftp proxy' checkbox state.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:36:47 +04:00
Andrew Borodin
ad37b33e0e Visual improvements of 'Configiration' dialog.
Now 'Configuration' dialog shows enabled/disabled input line
for Esc key timeout in depend of 'Single press' checkbox state.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:36:34 +04:00
Andrew Borodin
c034b04634 Reimplemented 'Layout' dialog engine.
Now 'Layout' dialog shows enabled/disabled buttons of panel size change
in depends of 'Equal split' chekbox state.
Now the "Console output" widgets are visible everytime, but they are
disabled if console_flag is not set.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:32:26 +04:00
Andrew Borodin
80d34ca625 Some reimplementation of "Listing mode" dialog.
Enabled/disabled widgets (input lines) are used now in "Listing mode"
dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:32:26 +04:00
Andrew Borodin
298e83f40b Added color for disabled widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:27:21 +04:00
Andrew Borodin
7869478668 Improvements of QuickDialog engine.
Added capability to modify options of QuickWidget.
Added capability to use custom callback in QuickDialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:27:21 +04:00
Andrew Borodin
760b700645 Added parameter to Wbutton callback to get the message sender easy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:27:21 +04:00
Andrew Borodin
09b094b153 Added dlg_find_by_id() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:27:21 +04:00
Andrew Borodin
a28edb691e Ticket #2257: added capability to interactive enable/disable widgets.
Added W_DISABLED flag for widget options.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-17 15:27:20 +04:00
Andrew Borodin
2ac7aeadc8 Ticket #2248: fixed segfault in autocompletion engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-16 09:47:25 +04:00
Slava Zanko
69b8a05816 Ticket #2276: copy/move: wrong directory update with the same name
Revert "Ticket #1907 (append filename to path copy/move operation)"
This reverts commit 9b5a8dec33.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-15 14:00:18 +03:00
Yury V. Zaytsev
3d2c4edd9c Ticket #30: Support for x clipboard (fixup)
Fixed a typo (clipbord -> clipboard) in the code and man pages. Luckily,
mc.ini key name is unaffected.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-07-12 12:55:33 +02:00
Andrew Borodin
c8bd032113 Ticket #2035: added "Toggle syntax highlighting" menu item.
Added "Toggle syntax highlighting" menu item.
Described C-s shortcut in mcedit man page.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-11 16:22:14 +04:00
Andrew Borodin
065573c33c Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-09 10:14:14 +04:00
Andrew Borodin
ce12059b0e Ticket #2264: segfault in 'Advanced chown' dialog window.
How ro reproduce:
1. Open 'Advanced chown' dialog window for any file.
2. Press "x" key (trying to make file executable).
3. Segfault.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-09 10:14:14 +04:00
Ilia Maslakov
8742b05f21 Ticket #2263 (hex viewer: non ASCII fix)
viewer does not show non ASCII characters in HEX mode.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-07-09 09:48:35 +04:00
Andrew Borodin
f660c97698 Ticket #2256: changed focused button in editor quit dialog.
Now the focused button in editor quit dialog is "Cancel quit" as was
before 4.7.3 release. Button order stay as in 4.7.3 release.
Likewise for hex editor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-08 19:54:12 +04:00
Slava Zanko
5c95084e2f Fixed bug with copy dir '\\\\' to anoter. Directoty whis this name was automatically renamed to '\\'
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-07-07 16:43:00 +03:00
Andrew Borodin
21e7453c94 Ticket #1523: added capability to forced run the internal editor.
Added CmdEditForceInternal binding in [main] section
to forced run the internal editor of MC.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-07 13:23:58 +04:00
Andrew Borodin
a8e63cd2c0 Fixed complile warnings about warn_unused_result attribute.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Andrew Borodin
7570f49906 Fixed view of console contents via cons.saver.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Andrew Borodin
442650239c Fixed i18n of file operation dialogs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Andrew Borodin
1d58783bad Cleanup of compiler and linker flags of cons.saver.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Andrew Borodin
e73bfb2486 Fixed some i18n stuff.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 21:35:18 +04:00
Ilia Maslakov
7dec7e5083 little optimization
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-07-05 14:56:58 +00:00
Ilia Maslakov
ad3cd6ae0c Ticket #2153 (editor wrong copy/move selected text)
fixed incorrect calculate position start/end marked block,
    after edit text in the area ahead marked text.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-07-05 14:56:57 +00:00
Andrew Borodin
59a85303a8 Optimization: don't process the replacement string very often.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 16:19:33 +04:00
Andrew Borodin
3e6491dcac Fixups of replacement algorithm.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 16:19:33 +04:00
Andrew Borodin
cc975c8024 Fixed memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 16:19:33 +04:00
Andrew Borodin
d2aad0716b Ticket #2231: fixup of replacement algorithm in mcedit.
Type accuracy. Removed unused variables. Removed double assignment.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-07-05 16:19:33 +04:00
Andrew Borodin
955c95bc58 Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-28 16:22:49 +04:00
Andrew Borodin
dd2ff08a48 Ticket #2115: fixed button location in common input dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-28 15:08:59 +04:00
Andrew Borodin
9dfe1ed070 Ticket #2248: mcedit: don't try set codepage again after file load.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-25 14:39:36 +04:00
Andrew Borodin
f86415f03e Ticket #1490: fix of exit from subshell handling.
If several screens are opened, exit from subshell is handled
icorrectly.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-25 14:26:42 +04:00
nikk
9b5a8dec33 Ticket #1907 (append filename to path copy/move operation)
append filename to path into copy/move dialog, "to:" input field

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-06-24 11:01:02 +04:00
Slava Zanko
48fe4e6881 Lock file is created and destroyed with full path.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:53 +04:00
Andrew Borodin
0bd04ed34f Implemented file locking in hex editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:22 +04:00
Andrew Borodin
b2ee413f03 Allow use file locking in various components of MC.
Renamed and moved src/editor/editloc.[ch] -> lib/lock.[ch].
Renamed lock handling functions.
Fixed library order in src/Makefile.am.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:22 +04:00
Andrew Borodin
15a7b10191 Ask user before exit if there are opened screens in MC.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:22 +04:00
Andrew Borodin
768f48de29 SIGWINCH handling in suspended dialogs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:22 +04:00
Andrew Borodin
cf6098505c Close dialogs during MC shutdown.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:44:15 +04:00
Andrew Borodin
56bbdeb15f Support of multiple editors and viewers.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
dfe9bc887a MC Edit: column_highlighting flag is a member of WEdit struct.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
2cc2f34912 MCView: reimplemented messages and commands handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
8024889126 Added type for MC viewer exit codes. Changed MC viewer run interface.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
a87165824c Added function to get dialog title.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
95e4424e92 Renamed current_dlg variable to top_dlg.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
74651f2e9f Added modal flag to the dialog structure.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
5c9826a897 Renamed dlg_id and parent fields of Widget structure.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
6efe7f2216 Reimplemented widget list in dialog using GList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
0e0f9c8ccd Added dialog state (active, suspended, closed).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:19 +04:00
Andrew Borodin
5ab573263a Modified dialog initialization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:18 +04:00
Andrew Borodin
62f0f101d7 Reimplemented dialogs stack using GList.
Code reorganization in src/dialog.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:18 +04:00
Andrew Borodin
bb7a44d3e8 Ticket #1490: implementation of multiscreen engine.
Multiscreen engine allows to run several editors and viewers
at the same time and switch between them.

Initial commit: minor refactoring: redefine dialog flags using enum.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-22 21:16:18 +04:00
Andrew Borodin
e793117b21 struct WPanel: changed type of searching field form int to gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-16 13:42:23 +04:00
Andrew Borodin
166fcfc15f Stop quick search before executing any main menu command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-16 13:42:23 +04:00
Andrew Borodin
ca0dd60500 Added CK_PanelStopSearch command to stop quick search.
Also added WIDGET_COMMAND handling in panel.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-16 13:42:23 +04:00
Andrew Borodin
893c020b01 Ticket #2175: clean quick search input line after interrupt of search.
Also quick search is interrupted now by any panel command.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-16 13:42:23 +04:00
Egmont Koblinger
86c1e06dee Ticket #2199: Buttonbar mouseclicks are off
Case 1: Make the terminal window 85 characters wide. Click (with the
mouse) on the right side of the "Copy" button on the bottom. See the
Move dialog appearing instead of the Copy dialog.

Case 2: Make the terminal 42 characters wide. Click on the bottom right
corner (the Re~ov button). MC invokes its menu or quits, depending on
the exact click location.

The patch that solves all these. The extra space is not assigned to the
first buttons, but distributed mostly evenly across buttons,
guaranteeing that the first five get exactly as much (or one character
less) than the second five, just as it works for the panels. Also, mouse
clicks use the exact same boundaries that were used when printing the
buttons.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>

Minor code cleanup, renamed local variable to avoid shadowing of global
variable, fixed formatting.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-15 09:46:01 +02:00
Andrew Borodin
8bcc49900b Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-14 14:04:02 +04:00
Andrew Borodin
dce8010059 Declaration of option_tab_spacing variable was moved from main.h to setup.h.
Includes were fixed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-14 13:53:02 +04:00
Andrew Borodin
0485ae5026 Ticket #2196: editor hangup if editor_tab_spacing is equalt to 0.
Check and correct value of option_tab_spacing during options loading.
Check and correct value of option_word_wrap_line_length during options loading
and after editor options changing.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-14 13:53:02 +04:00
Ilia Maslakov
c46e2925e1 Ticket #30 (use external clipboard utility)
added params clipbord_store, clipbord_paste into [Misc] section.
    created src/clipbord.[ch]
    added copy_file_to_ext_clip, paste_to_file_from_ext_clip for copy/paste
    text to the global X clipboard.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-06-11 13:47:46 +00:00
Andrew Borodin
9769ada65c Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-10 13:42:37 +04:00
Andrew Borodin
03513734c7 Ticket #2236: mcview segfaults trying open a compressed man page file.
How to reproduce:

mcview /usr/share/man/man1/bash.1.gz

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-10 13:39:49 +04:00
Andrew Borodin
044b9eca12 Fixed inaccuracy brach merging.
The e40a84f538 commit actually reverted
the 3209f8e61b one. That is wrong.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-10 11:23:30 +04:00
Alexandr Prenko
eafa23a2a7 Ticket #45 (fix for man2hlp warnings)
fixed warnings with some 'man' files

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-06-08 14:30:04 +04:00
Andrew Borodin
3ddec0f89d g_strcasecmp() function is deprecated.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:07:11 +04:00
Vit Rosin
e40a84f538 g_string_sprintf() is deprecated.
Reimplemented error messages in src/editor/edit.c using g_strdup_printf().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:07:11 +04:00
Andrew Borodin
9dc0a54ba1 Ticket #2085: replacement of deprecated GLib functions.
g_tree_traverse() is deprecated. g_tree_foreach() is used instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-08 13:03:26 +04:00
Andrew Borodin
a6b7f3ffe1 "Chown command" dialog: applied WGroupbox widget to draw frames.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 21:42:51 +04:00
Andrew Borodin
088c8f335b "Chmod command" dialog: applied WGroupbox widget to draw frames.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 21:42:51 +04:00
Andrew Borodin
aa0d96bd8b Ticket #1646: removed leading and trailing spaces in i18n resources.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 21:42:46 +04:00
Andrew Borodin
bef2bcebda Fixed int overflow in free modes calculation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 13:03:53 +04:00
Andrew Borodin
f16ef2090d set_display_type(): fixed memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 13:03:53 +04:00
Andrew Borodin
2d90717ace Minor changes of info panel look'n'feel.
Added title.
Added LTEE and RTEE symbols to the separator line.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 13:03:53 +04:00
Andrew Borodin
86a89655e5 Ticket #2226: info panel inprovements.
Fixed info panel initialization and destroying.
Fixed info panel drawing: don't draw info twice.
Fixed includes: added missing <sys/stat.h>.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-07 13:03:53 +04:00
Denys Vlasenko
97b8d4f57a Fedora build machinery noticed that cons.saver acquired
a new library in ldd listing, libglib.

I took a look at it and apparently it is not needed.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-06-04 23:34:41 +04:00
Andrew Borodin
a7cb5194c2 Removed unused defines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-06-04 23:34:15 +04:00
Andrew Borodin
39b45282e6 Ticket #2228: init_panelize(): undeclared 'input_colors'.
If MC is built with --disable-nls option, the input_colors constant
is undeclared in init_panelize() function.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-30 17:53:54 +04:00
Andrew Borodin
2c15a595c1 Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-28 14:58:05 +04:00
Andrew Borodin
0c551c6ed2 Fixed build with --disable-charset option. Minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-28 14:55:16 +04:00
Andrew Borodin
24f1e80cf1 Added title and separate line to the tree selection window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-28 11:31:48 +04:00
Andrew Borodin
196b44ead0 Minor changes of tree panel look'n'feel.
Added title.
Added LTEE and RTEE symbols to the mini-info separator.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-28 11:30:26 +04:00
Andrew Borodin
2f224cd85f Stop searching mode when tree becomes unfocused.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-28 11:30:26 +04:00
Andrew Borodin
ea2a64c46d Fixed length of current directory selecting line.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-28 11:30:26 +04:00
Andrew Borodin
ad023b3536 Ticket #2212: fixed WTree widget colors.
Directory tree is painted with incorrect colors in tree panel.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-28 11:30:26 +04:00
Ilia Maslakov
d3469a33f5 fixed man and help
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-27 22:27:00 +03:00
Andrew Borodin
3fa80a6828 quick_input: don't force set cursor position to 0.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-27 22:27:00 +03:00
Ilia Maslakov
9f595d0097 clear 'first' flag by mouse click.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-05-27 22:27:00 +03:00
Ilia Maslakov
a4e4378861 initial step to do mark in inpun fields
added selection with mouse

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

    Code cleanup: make visibility of some functions as static

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

fixed skins

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-05-27 22:26:59 +03:00
Ilia Maslakov
72bb075828 Ticket #2161 (del - clear input field)
new behavior: DEL - clear current field of dialog if text in the field is not modify and cursor not moved.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

Code cleanups: avoid compiler warnings

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-27 22:26:59 +03:00
Andrew Borodin
3209f8e61b edit_load_file_fast(): don't reset utf8 flag that was set early.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-27 14:07:22 +04:00
Andrew Borodin
72144b4895 edit_set_codeset(): new function to set codeset in MC editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-27 14:07:22 +04:00
Andrew Borodin
d37af446b7 Some optimization of viewer initialization.
Most of viewer initialization was moved to mcview_init() function
to rid of double initialization of mcview members.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-27 14:07:22 +04:00
Andrew Borodin
cc8a675ebb Ticket #1838: fix of broken charset autodetection.
First step: refactoring: unification of WTree and WInfo widget
constructions. Type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-27 14:07:22 +04:00
Slava Zanko
e3f7a0544b Code cleanup for compile with -Werror option
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-26 10:17:04 +04:00
Slava Zanko
916eba33a7 don't show cursor in listboxes.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-26 10:13:17 +04:00
Andrew Borodin
50ae5a8c6b Ticket #1771: don't show cursor in menu.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-26 10:13:17 +04:00
Andrew Borodin
eb284bcef8 Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-26 10:07:56 +04:00
Andrew Borodin
9a97d08c16 Ticket #2168: all hotkeys are in the lowercase now.
Hotkeys are already highlighted by the color; there is no any point
in using yet another attribute (uppercase) for emphasizing them
even more. Capitalizing a letter in the middle of a word looks ugly.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-26 09:59:03 +04:00
Alexandr Prenko
aefd218a32 Fixed bug: No newline at the end of file 2010-05-24 14:42:01 +03:00
Alexandr Prenko
4c00848641 Minor code cleanups 2010-05-24 14:42:01 +03:00
Alexandr Prenko
9722a476e6 Fixed bug: Wrong last char processing in handle_alt_font 2010-05-24 14:42:01 +03:00
Alexandr Prenko
738fed4ffb Fixed bug: Wrong string length calculation 2010-05-24 14:42:01 +03:00
Alexandr Prenko
fc0a3ebe93 Fixed bug: Wrong odd SH warning 2010-05-24 14:42:01 +03:00
Alexandr Prenko
84c1f750c4 Fixed string splitting by '\&' bug 2010-05-24 14:42:00 +03:00
Alexandr Prenko
8a46e40564 Fixed backslash handling 2010-05-24 14:42:00 +03:00
Alexandr Prenko
fd3dd57078 Bug fix: Invalid content generation 2010-05-24 14:42:00 +03:00
Slava Zanko
d523d6e531 Replace man2hlp (from C to perl)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-24 14:41:55 +03:00
Slava Zanko
649487fac1 Ticket #45: Build system does not allow cross compiling
The man2hlp program is build using the target compiler. The
resulting executable therefore does not work on the build host.
Since the man2hlp program is needed during compile time, the build
will fail.

Moved man2hlp into separate subdir

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-24 10:06:56 +03:00
Andrew Borodin
6d5c2628fe Ticket #2042: added a capability to create relative symlinks.
The original patch was posted by Anton Monroe <akm at meer dot net>
to mc-devel@gnome.org mailing list:
http://mail.gnome.org/archives/mc-devel/2006-April/msg00020.html

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-22 12:08:18 +04:00
Slava Zanko
da26aa561f Ticket #2195: Crash on search in viewed file after Parsed/Raw switching
View (F3) some file.
Switch Raw->Parse or Parse->Raw (F8).
Search any text, contained in the file.
Crash!

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-21 21:50:46 +04:00
Andrew Borodin
e8dbca5c25 New "Layout" configuration dialog is fully described.
Fixed dialog size calculation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
6a306c18b2 old_esc_mode option can be setup now in 'Configure options' dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
68523ac781 Reorganizing of 'Panel options' configuration dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
b95c9d42a5 Applied mouse_scroll_pages option to the mouse wheel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
a0dc031854 More options in configure dialogs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
8fd0771e38 Modified loading/saving panel options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
2b167cbef0 Configuration dialogs reorganization.
Panel options are moved to new dialog.
Panel setup options are collected in a special structure.
Includes clean up.
Code indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:46:15 +04:00
Andrew Borodin
be622a9981 Refactoring of configuration handling.
Some functions were renamed. Code was reorganized.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:44:43 +04:00
Andrew Borodin
f9f686af1e Added new quick widget: quick_groupbox.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:44:42 +04:00
Andrew Borodin
4ef4a5e032 Ticket #320: menu and configuration dialogs reorganization.
'Left'/'Right' menu was reorganized.
'File listing' menu item was added to fast switch file panel
to file listing mode.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 18:44:42 +04:00
Ilia Maslakov
718fdc8acc Ticket #2021 (MarkFileDown/MarkFileUp)
Added a new panel action 'PanelMarkFileDown'/'PanelMarkFileUp' for mark files and move cursor to the down or up after mark.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-05-14 18:18:37 +04:00
igor_b
877a9582f6 Ticket #2192: incorrect calculation of autocomplition window width.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 15:44:39 +04:00
Ilia Maslakov
c94da73c54 Ticket #2182 (fix incorrect tab size)
fixed incorrect tab size

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-05-14 11:48:45 +04:00
Andrew Borodin
c657141cbe Fixed 'mc -e' and 'mc -v' modes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-14 11:27:42 +04:00
Andrew Borodin
22b53cdf58 Ticket #2187: fix of broken 'mc -e' and 'mc -v' modes.
Initial step: refactoring: a piece of code was moved form main.c
into args.c. Some functions and variables were renamed.
Fixed includes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 11:27:42 +04:00
Andrew Borodin
7eb8f4030c Ticket #2183: edit crash while opening some incorrect files.
The result of

touch 1.gz

is not a valid gzip'ed file. MCEditor crashes trying open it.

Changed initialization order of editor to init charset conversion
handler by non-zero value before open a file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-14 11:10:10 +04:00
Andrew Borodin
73fbf38d46 Merge branch '2178_editor_ctrl_z_crash'
* 2178_editor_ctrl_z_crash:
  Applied MC indentation policy.
  Ticket #2178: crash in the return to the standalone MC editor.
2010-05-11 16:17:19 +04:00
Andrew Borodin
c468f37e5c Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-11 16:16:58 +04:00
Andrew Borodin
1980c5070b Ticket #2178: crash in the return to the standalone MC editor.
Don't touch file panels info if MC runs as standalone editor or viewer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-11 16:16:13 +04:00
Andrew Borodin
296b8e6d79 Ticket #2025: changed URL for bug reports.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-08 18:15:59 +04:00
Ilia Maslakov
91859e4a21 Fixed fogotten diff_map, diff_keymap
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-05-08 12:49:53 +00:00
Ilia Maslakov
823387a793 Removed hardcoded hotkeys in dialog.c Replaced keymap's initialization from main.c into setup.c
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

Collect keybind-related variables in src/keybind.[ch] files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-07 15:02:11 +04:00
Slava Zanko
cc1dbc7908 Fixed behavior after pressing PageDown at end of file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-05 21:33:16 +03:00
Andrew Borodin
5b26c97961 Ticket #2135: fix of jump to end of file in viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 21:33:16 +03:00
Andrew Borodin
fbf2dd73c4 Updated Russian translation.
Fixed width of diff options dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 21:40:20 +04:00
Slava Zanko
8f48bf2aec Fixed errors and warnings in compilation stage.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-05 16:24:14 +04:00
Andrew Borodin
9970def1c2 More accuracy of Diff Viewer conditiona compilation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
a2ec23a504 Type accuracy in feed_subshell() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
873880edc2 vfs_timeout and use_netrc variables were moved to vfs.h file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
54b38bd381 Set maximum width of help window to 80 symbols.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
dd74fc504c Minor optimization of show_version() function.
Set "Virtual File System" text item to plural form.
Applied i18n to "Data types" text item.
Added output of size_t size.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
f0f1a7c7ff Removed unused src/ecs* files and related stuff.
As a consequence, --enable-extcharset option of configure was removed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
80ceccd90d Removed uneeded extra assignment of command line complete flags.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
fc43eba894 Changed function argument names.
Changed function argument names to suppress compile warnings:
panel.h:143: warning: declaration of 'index' shadows a global declaration
panel.h:144: warning: declaration of 'index' shadows a global declaration

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
c0f6a3bd1d Fixed formatting after indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Pavel Vasilyev
e88141145e Ticket #1949: complete initialization of structures in src/args.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
7ada01bfa1 Ticket #2078: changed return value of init_translation_table() function.
init_translation_table() now returnes newly-allocated string
instead of pointer to the static buffer.

Thanks Vit Rosin for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Vit Rosin
993d678ed9 Use EXIT_FAILURE symbolic name as return code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Vit Rosin
1c367a41fd Removed unneeded break after return.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:14 +04:00
Andrew Borodin
e70db42deb Grammar.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:24:13 +04:00
Andrew Borodin
4cea5be1ac Ticket #2097: clean up before 4.7.2 release.
Split assignments and conditions. Type accuracy. Minor optimization.

Thanks Vit Rosin for original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-05-05 16:23:51 +04:00
Slava Zanko
3a1e0966ae Final Indentation of all touched files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-04 17:34:21 +03:00
Enrico Weigelt, metux IT service
db6944f619 Changes into src/consaver directory:
* src/cons.saver.c:
  * handling IO errors in send_contents()
  * ignoring errors in die()
  * handling IO errors in main()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-04 17:34:20 +03:00
Slava Zanko
5d79a90737 Changes into src/editor directory:
* edit/editcmd.c:
  * ignore fscanf() result in edit_delete_macro()
  * ignore fscanf() result in edit_load_macro_cmd()
  * ignoring mc_chown() errors in edit_save_file()
  * handling system() call errors in edit_block_process_cmd()
 * edit/edit.c: handling read errors in edit_load_file_fast()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-04 17:34:20 +03:00
Slava Zanko
35dae723ee Changes into src directory:
* src/background.c:
   * handling read() errors in background_attention()
   * handling IO errors in parent_call_string()
   * ignoring IO errors in background_attention()
   * ignoring write() errors in parent_call_header()
   * ignore IO errors in parent_call()
 *  src/cons.saver.c:
   * handling IO errors in show_console_contents_linux()
   * handling IO errors in handle_console_linux()
 * src/file.c: handling mc_chdir() errors in panel_operate
 * src/find.c: ignoring errors on chdir() call
 * src/main.c:
   * ignoring errors on last write()'s in main()
   * ignoring mc_chdir() errors in setup_dummy_mc()
   * ignoring mc_chdir() errors in translated_mc_chdir()
 * src/panelize.c: ignoring errors on chdir() call
 * src/screen.c:
   * ignoring mc_chdir() errors in panel_new_with_dir()
   * ignoring mc_chdir() errors in reload_panelized()
   * ignoring mc_chdir() errors in update_panels()
 * src/subshell.c: ignoring errors on chdir() call
 * src/tree.c: ignoring mc_chdir() errors in tree_rescan()
 * src/treestore.c: handling read errors in tree_store_load_from()
 * src/widget.c: handling mc_write() errors in save_text_to_clip_file

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-05-04 17:34:20 +03:00
Andrew Borodin
12d3ef7171 Applied MC indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-30 18:25:32 +04:00
Andrew Borodin
d391813325 Optimization: rid of edit_menubar global variable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-30 18:11:48 +04:00
Andrew Borodin
962bd6fc15 Optimization: rid of wedit and option_syntax_type global variables.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-30 18:11:48 +04:00
Andrew Borodin
1480937b17 Type accuracy. Minor optimization.
GLib function are used to manadge array of strings.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-30 18:11:48 +04:00
Andrew Borodin
469d119e12 Ticket #1754: show current syntax in 'Choose syntax highlighting' dialog.
Now current syntax scheme is highlighted in 'Choose syntax highlighting'
dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-30 18:11:47 +04:00
Ilia Maslakov
c8bfd2d992 Ticket #1734 (viewer: EOL, BOL movement not work in plain mode)
fixed EOL, BOL movement in plain mode.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-30 11:45:57 +04:00
Ilia Maslakov
86758ed198 Ticket #2005 (viewer: Text area is not updated in hex mode)
fixed: Text area is not updated in hex mode (in utf-8).

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-30 08:57:05 +04:00
Daniel Borca
bc0ad94461 ydiff.c: minor fix for more pretty show diff.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-30 08:44:08 +04:00
Ilia Maslakov
946715e971 Ticket #2155 (remove selected text before input)
Remove selected text before input or paste from clipboard.
    Thanks to nikk9 <dev.nul@mail.ru> for the original patch.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-28 19:12:43 +00:00
Andrew Borodin
c2b0209ec9 Update panels after closing the diff viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-27 12:16:05 +04:00
Andrew Borodin
744d61ba03 Optimization of Diff Viewer construction and destruction.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-27 12:16:05 +04:00
Ilia Maslakov
93247568d0 added diff options dialog
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-27 12:16:04 +04:00
Ilia Maslakov
185a6f67f7 added save/load diffview options.
little fixes in the options dialog

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-27 12:16:04 +04:00
Andrew Borodin
e045279dbc Modified destroying of WDiff widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-27 12:16:04 +04:00
Andrew Borodin
6c3e3715f8 Repaint screen after encoding change.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-27 12:16:03 +04:00
Andrew Borodin
29cab775c7 Minor clean up.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-27 12:16:03 +04:00
Slava Zanko
14fa0ea1e2 Added usage of search engine.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-04-27 12:16:03 +04:00
Ilia Maslakov
e5dc79a441 added merge mechanism
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-27 12:15:41 +04:00
Andrew Borodin
f356d83972 Fixes of button bar handling.
Implemented handling of mouse actions in button bar.
Fixed vertical size of Diff Viewer widget.
DiffHelp action was added. F1 button was assigned for it.
Fixed some key bindings.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-26 11:44:33 +04:00
Andrew Borodin
3f11aecb74 buttonbar_call(): don't handle Fx button with non-defined command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-26 11:44:32 +04:00
Ilia Maslakov
bc03546f3a little fixup and optimization
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-26 11:44:32 +04:00
Ilia Maslakov
103e9f9613 fixed display utf-8 text in 8-bit locale
fixed display 8-bit text in utf-8 locale

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-26 11:44:32 +04:00
Ilia Maslakov
d60be3ca56 initial step to multiple encodings support and select codeset.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-26 11:44:32 +04:00
Andrew Borodin
b9bd749e23 Fixed segfaults in standalone diff viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-26 11:44:32 +04:00
Andrew Borodin
8e55efe547 src/diffviewer/ydiff.c: use GLib functions more widely.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-04-26 11:44:31 +04:00
Slava Zanko
29a1ad784f diffviewer: Added libmc for build depends
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-04-26 11:44:31 +04:00
Andrew Borodin
78032688f5 Added capability to run MC as standalone diff viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-04-26 11:44:31 +04:00