Commit Graph

12869 Commits

Author SHA1 Message Date
Andrew Borodin
d902b8775a mcedit: apply status message for file load process.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:31 +04:00
Andrew Borodin
92c4040ffb mcedit: apply status message for search process.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:31 +04:00
Andrew Borodin
00f118e963 (edit_buffer_calc_percent): new editor buffer API.
Modify way to calculate persentage: use byte offers instead of line one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
dc03e9e28d mcviewer: apply status message for search process.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
fc3f837d03 mcviewer: refactoring of percentage display.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
9768be9c24 Apply status message for directory size calculation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
c672ed9b21 (label_set_textv): new WLabel API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
9d4bafd889 (simple_status_msg_t): simple status message with label and 'Abort' button.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
55e604901f Create status dialog window to interrupt long-time operations.
Such dialog allows:
  * show status of operation;
  * control operation using dialog buttons (Abort, Suspend, Resume, etc).

Status dialog is raised after specified delay after operation start.
If operation duration is less than delay, the status dialog is not raised.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
62faec3a61 Ticket #2136: implement user-friendly interruption of long-time operations.
Initial step: created a simple timer.

Unlike GTimer, mc timer doesn't use a lot of multiplications and
divisions to convert seconds to nanoseconds and back. mc timer use only
multiplications to convert seconds to microseconds.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:40:30 +04:00
Andrew Borodin
e786d8266e (mouse_get_local): set Gpm_Event::modifiers only if libgpm is used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:35:51 +04:00
Andrew Borodin
87ee1b871e Merge branch '3189_cleanup'
* 3189_cleanup: (47 commits)
  Make working with GError in more right way (like with exceptions).
  Sync with gnulib 6da37d4814fb6d1c61169de4092205a056a04a21.
  (mcview_set_datasource_string): minor optimization.
  select_flags: make member of panels_options_t.
  (panel_execute_cmd): concentrate handling of select/unselect files here.
  (FileProgressStatus): change values to avoid overlapping with B_* values.
  (listbox_event): clarify check whether listbox is empty.
  Sync with gnulib 502809019bd2ca3ce3d041d18c35ce9420eedb72.
  (do_enter): make inline and return gboolean instead of int.
  (panel_get_title_without_hotkey): return pointer to static buffer
  Sync with gnulib f345edc03da1a81f313dd70305764025bffeb1fa.
  src/filemanager/panel.c: clarify condition in 'for' statements.
  (move_selection): variable is boolean instead of int.
  (maybe_cd): argument is boolean instead of int.
  src/filemanager/panel.c: use variable initialization
  src/filemanager/panel.c: 'else' after 'return' is useless.
  src/filemanager/panel.[ch]: make some functions inline.
  src/filemanager/panel.c: cosmetics: empty lines, extra braces.
  (parse_display_format): minor optimization: get rid of strchr() call.
  src/filemanager/panel.[ch]: use gboolean instead of int for boolean variables.
  ...
2014-07-22 13:13:22 +04:00
Slava Zanko
512ad7d962 Make working with GError in more right way (like with exceptions).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2014-07-22 13:12:07 +04:00
Andrew Borodin
a8d46f29d3 Sync with gnulib 6da37d4814fb6d1c61169de4092205a056a04a21.
Do not classify a bind-mounted dir entry as "dummy".

* m4.include/ls-mntd-fs.m4: Check for hasmntopt() on platforms with
1-argument getmntent() (instead of assuming absence).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
2712c1aefc (mcview_set_datasource_string): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
c1c8b8cdd9 select_flags: make member of panels_options_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
9e0328ea54 (panel_execute_cmd): concentrate handling of select/unselect files here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
f72cf464c9 (FileProgressStatus): change values to avoid overlapping with B_* values.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
478e58dfa2 (listbox_event): clarify check whether listbox is empty.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
46651f04d1 Sync with gnulib 502809019bd2ca3ce3d041d18c35ce9420eedb72.
Avoid hasmntopt const type warning on Solaris.

Solaris defines the OPT param of hasmntopt() with char * instead of
const char *. Passing the constant string "ignore" generates a compiler
warning. For Solaris cast MNT_IGNORE to avoid the warning.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
a18cf7bae6 (do_enter): make inline and return gboolean instead of int.
(do_enter_on_file_entry_t): rename back to do_enter_on_file_entry and
return gboolean instead of int.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
2c551edd61 (panel_get_title_without_hotkey): return pointer to static buffer
...to avoid extra memory allocation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
84ce2f2b25 Sync with gnulib f345edc03da1a81f313dd70305764025bffeb1fa.
Port 'open' and 'close' redefinitions to AIX 7.1.

Do not #undef 'open' and 'close'. AIX 7 does '#define open open64' and
then 'int open64(const char *, int, ...);', which means the declaration
for 'open' gets lost if we later '#undef open'. Discovered while
building grep pretest 2.18.151-1c770 on AIX 7.1, where the compilation
reported the non-fatal error "In function 'openat_proc_name' ...
warning: implicit declaration of function 'open'". In this case the
error is relatively harmless, but in other cases it might not be so
minor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
40caba34a9 src/filemanager/panel.c: clarify condition in 'for' statements.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
443b845b0f (move_selection): variable is boolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:07 +04:00
Andrew Borodin
65f7dc3ea1 (maybe_cd): argument is boolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
248a5fc74a src/filemanager/panel.c: use variable initialization
...to remove one branch in 'if' statement.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
fea7491386 src/filemanager/panel.c: 'else' after 'return' is useless.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
ac3aaac556 src/filemanager/panel.[ch]: make some functions inline.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
5a1fed2d98 src/filemanager/panel.c: cosmetics: empty lines, extra braces.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
caa916e94f (parse_display_format): minor optimization: get rid of strchr() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
3fb9627ead src/filemanager/panel.[ch]: use gboolean instead of int for boolean variables.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
67e6bb8cac (use_display_format): refactoring of panel column size calculation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
e6030d8e74 Sync with gnulib 94ee038129c3b40510ef0ff6ac6ddfe85bf0f97f.
(xstrtoumax): use enum instead of 0, to pacify IRIX 6.5 cc.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
acf34eb98e (mc_config_get_string_list): clarify usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
725997c8d0 (mc_config_get_groups): optimization of function itself and usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
e62906473b (mc_config_get_keys): optimization of function itself and usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
dbf405d290 (mcview_display_text): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:12:06 +04:00
Andrew Borodin
ec7193af37 misc/ext.d/image.sh: minor clarification in image view/open actions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
24c14153c5 (ftpfs_netrc_lookup): fix null check after dereference
...and simplify.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
e33a48fc95 (tar_read_header): fix dereference of null pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
c9d9a8ba93 (sftpfs_open_socket): fix condition of port check.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
8c040b46b8 (x_basename): fix dereference of null pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
a6c5c82fa0 (str_ascii_fit_to_term): fix out-of-bound write.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
4e5819d169 (str_8bit_fit_to_term): fix out-of-bound write.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
708f474d1e (mc_search_regex__process_append_str): fix possible dereference of null pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
e7252b6603 (lock_extract_info): fix out-of-bound writes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
2d9cf4cad1 (vfs_s_get_line_interruptible): disable interrrupt after finish of read
...and type accuracies.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
33633d610b (extfs_get_plugins): fix possible file descriptor leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00
Andrew Borodin
27a14760da (fish_file_store): fix memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-07-22 13:10:41 +04:00