summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-02-17 09:42:31 +0100
committerStefano Karapetsas <[email protected]>2014-02-17 09:42:31 +0100
commit6996153b65419c61b75f4f3acd96a61141529ac8 (patch)
treee2d6deb8d7ea67f1fb060eb272e73e6cd46f0bc9
parent38f6f2b09c2a24d57badb82831e8d18e18648747 (diff)
downloadpluma-6996153b65419c61b75f4f3acd96a61141529ac8.tar.bz2
pluma-6996153b65419c61b75f4f3acd96a61141529ac8.tar.xz
Fix pluma_dirs_get_user_accels_file
And free always config_dir
-rw-r--r--pluma/pluma-dirs.c37
1 files changed, 4 insertions, 33 deletions
diff --git a/pluma/pluma-dirs.c b/pluma/pluma-dirs.c
index c28fe9d9..24aa6209 100644
--- a/pluma/pluma-dirs.c
+++ b/pluma/pluma-dirs.c
@@ -65,41 +65,12 @@ gchar* pluma_dirs_get_user_plugins_dir(void)
gchar* pluma_dirs_get_user_accels_file(void)
{
gchar* accels = NULL;
+ gchar *config_dir = NULL;
- #ifndef G_OS_WIN32
- const gchar* envvar;
- const gchar* config_dir;
+ config_dir = pluma_dirs_get_user_config_dir();
+ accels = g_build_filename(config_dir, "accels", NULL);
- /* on linux accels are stored in .config/accels
- * for historic reasons (backward compat with the
- * old libmate that took care of saving them */
-
- /* Support old libmate env var */
- envvar = g_getenv("MATE22_USER_DIR");
-
- if (envvar != NULL)
- {
- accels = g_build_filename(envvar, "accels", "pluma", NULL);
- }
- else
- {
- config_dir = pluma_dirs_get_user_config_dir();
-
- if (config_dir != NULL)
- {
- accels = g_build_filename(config_dir, "accels", NULL);
- }
- }
- #else
-
- gchar *config_dir = NULL;
-
- config_dir = pluma_dirs_get_user_config_dir();
- accels = g_build_filename(config_dir, "accels", "pluma", NULL);
-
- g_free(config_dir);
-
- #endif
+ g_free(config_dir);
return accels;
}