Commit Graph

12119 Commits

Author SHA1 Message Date
Slava Zanko
ee8aaf6181 Avoid compiler errors like: error: variable 'xxx' set but not used [-Werror=unused-but-set-variable]
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-01-17 15:21:35 +03:00
Andrew Borodin
d5afda1188 Clarify check of C compiler flags.
AC_TRY_COMPILE macro is obsolete. Use AC_COMPILE_IFELSE instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
dbbfe5d070 Enable -Wunused-but-set-variable flag by default.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
3127e8d9ba Clarify usage of use_internal_edit variable
...and disable "Use internal edit" checkbox in case of build
without internal editor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
c02fac4af7 Merge src/filemanager/option.[ch] to src/filemanager/boxes.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
6cd19ea6cb Remove irrelevant comments about file_date() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
9423f3f080 Avoid C++-style comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
ae6e647845 (mc_global_t::shell): new member to store user's shell
...instead of global variable "shell".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
e35f044ccd (subshell_prompt): changed to GString.
(read_subshell_prompt): refactoring to ret rid of low-level memory reallocation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
0e7810eb5f (read_subshell_prompt): return gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
0e6addcb96 Ticket #2944: code cleanup before 4.8.8 release.
(mc_prompt): move from src/setup.[ch] to src/filemanager/midnight.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
64542733b6 Merge branch '2076_copy_progress_width'
* 2076_copy_progress_width:
  WHLine: allow draw text over horizontal line.
  Copy/move/delete progress dialog occupies at least 2/3 of screen width.
  Ticket #2076: make copy/move/delete progress dialog wider.
2013-01-14 16:23:49 +04:00
Andrew Borodin
33cac494c0 WHLine: allow draw text over horizontal line.
* (hline_set_text): new function.
  * (file_progress_show_total): use hline_set_text to show processed
  files counter.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-14 16:23:17 +04:00
Andrew Borodin
75d165b7c7 Copy/move/delete progress dialog occupies at least 2/3 of screen width.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-14 16:23:17 +04:00
Andrew Borodin
2176e5f283 Ticket #2076: make copy/move/delete progress dialog wider.
Initial step: get rid of hardcoded width of progress bar.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-14 16:23:17 +04:00
Sergei Trofimovich
4b3d88f07c m4.include/mc-cflags.m4: report real compiler in MC_CHECK_ONE_CFLAG instead of 'gcc'
Example use: CC=clang ./configure

Before the patch configure reported 'gcc' is being used:

    checking whether gcc accepts -Wcomment... yes
    checking whether gcc accepts -Wdeclaration-after-statement... yes
    checking whether gcc accepts -Wfloat-equal... yes
    checking whether gcc accepts -Wformat... yes

(config.log used proper ${CC})

After the patch it lies a bit less:

    checking whether clang accepts -Wcomment... yes
    checking whether clang accepts -Wdeclaration-after-statement... yes
    checking whether clang accepts -Wfloat-equal... yes
    checking whether clang accepts -Wformat... yes

Reported-by: Agostino Sarubbo <ago@gentoo.org>
Gentoo-bug: http://bugs.gentoo.org/449752
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2013-01-02 16:22:21 +03:00
Slava Zanko
5454fb9a85 Updated translations from Transifex
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-28 12:12:04 +03:00
Slava Zanko
a7e0d7ebad Updated doc/NEWS file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-28 11:33:38 +03:00
Slava Zanko
e86ed3ae34 Updated translations from Transifex
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-28 11:27:21 +03:00
Andrew Borodin
8cf9ba1b5c Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-25 08:53:52 +04:00
Ilia Maslakov
a9227fdd33 Merge branch '2914_aspell_lang_fix'
* 2914_aspell_lang_fix:
  changed mcedit man.
  Ticket #2914 (disable annoying aspell warnings about spelling language)
2012-12-24 13:23:47 +04:00
Ilia Maslakov
77a6ad9427 changed mcedit man.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-24 13:23:19 +04:00
Ilia Maslakov
4861d06073 Ticket #2914 (disable annoying aspell warnings about spelling language)
Added the aspell param 'spell_language' in ini-file.
    This allow set spelling language. spell_language=NONE - disable aspell support.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-24 13:23:18 +04:00
Andrew Borodin
9f797a4c47 Update po/mc.pot and po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-24 11:25:04 +04:00
Andrew Borodin
a6b24d88c8 Merge branch '2111_pause_copy'
* 2111_pause_copy:
  src/filemanager/find.c: unify i18n resource (button name).
  Implement pause in copy/move/delete file operation.
  Ticket #2111: allow pause in copy/move/delete file operation.
2012-12-24 11:13:52 +04:00
Andrew Borodin
9862323d11 src/filemanager/find.c: unify i18n resource (button name).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 13:37:49 +04:00
Andrew Borodin
68ee80abb8 Implement pause in copy/move/delete file operation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-21 13:37:44 +04:00
Andrew Borodin
161a5af516 Ticket #2111: allow pause in copy/move/delete file operation.
Initial step: if button callback retuns zero, don't close the dialog after
button press.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 13:37:39 +04:00
Andrew Borodin
2f74680628 (init_learn): fix discard of "const" qualifier from pointer target type assignment.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 16:38:06 +04:00
Andrew Borodin
5e070286b1 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 16:22:23 +04:00
Andrew Borodin
d8f970c503 Merge branch '2888_cleanup'
* 2888_cleanup: (34 commits)
  (exec_get_export_variables_ext): use g_new0() for stable test results.
  Implement quick and easy disable of xdg-open usage.
  Sync with gnulib 40f82767840187c20051ca99385f75a42f92de99.
  Add extra checks in macro engine.
  Ticket #2935: update uc1541 extfs plug-in up to version 2.5.
  (del_widget): fix memory leak.
  (editcmd_dialog_replace_prompt_show): fix string truncations.
  Portability: rename some str_class members
  Portability: ESC_CHAR is defined in /usr/include/langinfo.h in some systems
  Cleanup code related to GLib < 2.12.
  Portability: use g_ascii_strtoll instead of strtoll, atoll and atof.
  Fix crash when user menu is called in editor with no filename.
  Keep some edit window parameters during file reloading.
  Fix editor crash in "Save as..." command.
  Ticket #2841: adjust i18n label sizes in learn key dialog.
  Disable the localized output of utilities such as - ls, git, etc..
  (add_widget_autopos): don't access to NULL widget.
  Parenthesis around some -1.
  src/filemanager/mountlist.c: use GLib functions to allocate/free memory.
  Sync with gnulib 613bcb6205cf2b64d835c19074c5a7e7c6cb99eb
  ...
2012-12-20 15:37:24 +04:00
Slava Zanko
e13437d950 (exec_get_export_variables_ext): use g_new0() for stable test results.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-20 15:35:40 +04:00
Sergey Y. Afonin
42f54a0a32 Implement quick and easy disable of xdg-open usage.
MC_XDG_OPEN=/bin/false can be used to disable xdg-open usage in
/usr/libexec/mc/ext.d/*.sh scripts.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:36 +04:00
Andrew Borodin
6c6ce83af7 Sync with gnulib 40f82767840187c20051ca99385f75a42f92de99.
mountlist: recognize more "dummy" file systems
* src/filenamager/mountlist.c (ME_DUMMY_0):
Add these dummy FS names to the list:
  - "debugfs" virtual filesystem for kernel debugging
  - "devpts" PTY slave filesystem
  - "devtmpfs" device filesystem on top of tmpfs/ramfs
  - "fusectl" control filesystem for FUSE
  - "mqueue" enumerates POSIX message queues
  - "rpc_pipefs" kernel <-> userspace bridge for NFS
  - "sysfs" is for exporting kernel objects
  - "devfs" device filesystem for Linux 2.4 and FreeBSD

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:36 +04:00
Slava Zanko
db2c31decc Add extra checks in macro engine.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-20 15:35:36 +04:00
Andrew Borodin
8a1971026d Ticket #2935: update uc1541 extfs plug-in up to version 2.5.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
30dbb79655 (del_widget): fix memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
d87a0bfe92 (editcmd_dialog_replace_prompt_show): fix string truncations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
0e5b483974 Portability: rename some str_class members
...to avoid conflict with global names.

On HP-UX, inttypes.h includes ctype.h through other dependencies, ctype.h
defines macros for various functions and these macros clash with entries
of "struct str_class".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Mikulas Patocka
b475e31255 Portability: ESC_CHAR is defined in /usr/include/langinfo.h in some systems
...so undefine it to avoid warning.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
e9f883a3cf Cleanup code related to GLib < 2.12.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
17cadc50ec Portability: use g_ascii_strtoll instead of strtoll, atoll and atof.
Set minimal version of GLib up to 2.12 because of g_ascii_strtoll.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
e574972d58 Fix crash when user menu is called in editor with no filename.
(mc_search): immediately return FALSE if str is NULL.
(mc_search_run): immediately return FALSE if user_data is NULL.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
2eeb950439 Keep some edit window parameters during file reloading.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
d50d1d748d Fix editor crash in "Save as..." command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
368e250102 Ticket #2841: adjust i18n label sizes in learn key dialog.
Learn keys dialogue shows "smaller buttons" when localized key names
include special chars (as the "á" in "Avanzar página" for es_ES locale).
"%Ns" formats for g_snprintf are not reliable for multibyte encodings.
For larger buttons (> 16 characters), padding size must be zero.

Thanks David Martin for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Ilia Maslakov
f25feaab1f Disable the localized output of utilities such as - ls, git, etc..
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-20 15:35:35 +04:00
Andrew Borodin
3fc490ea12 (add_widget_autopos): don't access to NULL widget.
(del_widget): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
82b1d7bff3 Parenthesis around some -1.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
24f0533432 src/filemanager/mountlist.c: use GLib functions to allocate/free memory.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00