Mooffie
306b30ed30
Ticket #3687 : store the 'hotlist' file in data dir, not config dir.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:48:02 +03:00
Andrew Borodin
8002e52293
(mc_config_init_config_paths): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:37:50 +03:00
Andrew Borodin
496abc0e1f
Rename mc_config_get_profile_root() to mc_get_profile_root()
...
...and move it out from lib/mcconfig.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-12-04 09:37:50 +03:00
Mooffie
239a8d0117
Ticket #3684 : replace $MC_HOME with $MC_PROFILE_ROOT, a better "profile" mechanism.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-11-29 11:10:19 +03:00
Mooffie
61f4ef98b9
lib/mcconfig/paths.c: reduce scope of 'homedir' var.
...
To ensure that nobody uses the 'homedir' variable in the future without
initializing it first, we make it private to the function, thereby effectively
removing it.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:11:01 +03:00
Mooffie
92889819ea
lib/mcconfig/paths.c: cleanup.
...
We can conclude, by reading their GLib source[1], by their documentation,
and by looking at how popular programs use them[2], that the functions
g_get_user_{config,cache,data}_dir() don't return a NULL or empty string.
So the handling of this case can go.
[1] https://git.gnome.org/browse/glib/tree/glib/gutils.c
[2] E.g., google "g_get_user_data_dir".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:11:01 +03:00
Andrew Borodin
2151edaff2
Get rid of global variables mc_main_config and mc_panels_config.
...
Use mc_global.main_config and mc_global.panels_congig instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
eef076cef6
cppcheck: Cleanup Passing NULL after the last typed argument warning
...
Cleanup Passing NULL after the last typed argument warning.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
97e370e396
lib/mcconfig/paths.c: cleanup -Wcast-qual warning.
...
Signed-off-by: Andreas Mohr <and@gmx.li>
2016-04-16 10:23:43 +03:00
Andrew Borodin
471ea781ca
Update copyright years.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-01-01 11:48:10 +03:00
Andrew Borodin
4ce4c9b7dc
Remove GLib-compatible code related to GLib < 2.26.
2016-01-01 11:48:06 +03:00
Alexander Kriegisch
09ed02ea85
Minor code changes.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2015-11-10 11:55:38 +03:00
Andrew Borodin
b698b7e834
Ticket #3435 : clang compiler fixes/cleanups.
...
Since O_* macros are used in lib/global.h, include <fcntl.h> there.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:49 +03:00
Andreas Mohr
8a2f9e253d
Ticket #3430 : introduce -Wundef check to catch macro typos.
...
Use always defined MC_HOMEDIR_XDG macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andreas Mohr
7665a2a2e2
Ticket #3420 : code cleanup before 3.4.15 release.
...
Ticket #3424 : fix -Wdeclaration-after-statement compiler warnings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2015-05-03 19:43:48 +03:00
Andrew Borodin
454479549c
Update copyright years.
2015-02-26 09:12:08 +03:00
Andrew Borodin
6d82155270
Massive use of MC_PTR_FREE macro.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-09-02 15:32:36 +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
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
e5203cb023
Fix name of FSF in all *.c files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-28 13:33:17 +04:00
Andrew Borodin
f0da49345a
Collapse list of copyright years to ranges. Add 2014 year.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2014-02-10 16:27:03 +04:00
Andrew Borodin
705afe88c0
(mc_config_new_or_override_file): minor optimization.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:51 +04:00
Andrew Borodin
8454f12f8f
Ticket #2954 : fix typo: occured -> occurred.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Slava Zanko
e50c3f8475
mc_config_get_string(): if default parameter is NULL, then no any config entities will be created
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
5b63c39459
mc_config_get_string_raw(): if default parameter is NULL, then no any config entities will be created
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Andrew Borodin
60727b9b79
Clarify usage of AM_CPPFLAGS.
...
Use AM_CPPFLAGS not AM_CFLAGS for includes. GLIB_CFLAGS are CPPFLAGS, actually.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:27:49 +04:00
Andrew Borodin
dc62fdf5bd
lib/mcconfig/paths.c: indentation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:35:46 +04:00
Andrew Borodin
f9b6abde52
Don't exit after migration of configuration files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
d82757d233
Ticket #2917 : Makefile.ams cleanup: remove unused AM_CPPFLAGS.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:24:30 +04:00
Andrew Borodin
908e747861
Optimization of ini files load.
...
Some ini files (keymaps, skins) are loaded in read-only mode. For those
files, we don't need load and keep comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-31 14:50:11 +04:00
Andrew Borodin
b37af47023
Makefile.ams cleanup.
...
Set defines via CPPFLAGS variable not via CFLAGS one.
Use AM_CPPFLAGS and AM_CFLAGS variables instead of per-target ones.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
c937060676
Ticket #1851 : fixed support of XDG_* shell variables
...
...broken in 13a660d2e0
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-04 15:52:08 +04:00
Andrew Borodin
13a660d2e0
Allow setup mc home directory using MC_HOME environment variable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:43:55 +03:00
Slava Zanko
4945d0f9a6
Changed interface of function mc_open() for handle vfs_path_t object as parameter
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
eeaad790ab
Changed interface of mc_stat() and mc_lstat() functions
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:24 +03:00
Slava Zanko
1dffc24f9b
Fixed user defined home dir, if home dir contain tilda (~/)
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 12:30:35 +03:00
Andrew Borodin
b49c165c59
(mc_config_normalize_before_save): fixed possible memory leak.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Slava Zanko
29ba0a0cda
Show error and don't start if config directory is a regular file
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
6b2c8d4800
Fixed migration rules
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
162a330f42
Added unit test for mc_config_get_full_path() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
6c32fa3b84
Added function mc_config_get_full_path() for search user's config files by short names.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
25c9267ac3
Some config files moved to more appropriate places.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
a8c3ab345d
Changed source code for respect '--enable-homedir' configure option.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Andrew Savchenko
6d99accfe0
Ticket #2676 (save of some learned keys is broken)
...
fixed saving of 'F13'-'F20' learned keys.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-12-06 11:42:20 +04:00
Slava Zanko
0138645541
Ticket 1551: Update GPL version from 2 to 3
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Slava Zanko
bb12a1296f
Direct commit: fixed broken build
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 13:49:56 +03:00
Andrew Borodin
8ff0da42cd
lib/mcconfig/paths.c: cleanup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 12:38:03 +03:00
Slava Zanko
c057627979
Ticket #1851 : Home config directory [xdg-user-dirs]
...
Fixed migrating user config files.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 12:38:03 +03:00
Slava Zanko
be0f9dda56
mcconfig: make parameters in some functions as const mc_config_t *
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00