! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
XFCE4HOME env parm not used by all mcs-plugins
Status:
CLOSED: FIXED
Product:
Xfce-mcs
Component:
General

Comments

Description orelien 2004-07-11 17:44:02 CEST
For mcs-plugins xfwm4, xffm and xfce4-iconbox, settings are saved in a
hardcoded path, instead of using XFCE4HOME.
Comment 1 orelien 2004-07-11 17:44:04 CEST
Additional information:

diff -Nur xfwm4-4.0.5/mcs-plugin/xfwm4_plugin.c
xfwm4-4.0.5-new/mcs-plugin/xfwm4_plugin.c
--- xfwm4-4.0.5/mcs-plugin/xfwm4_plugin.c 2003-07-14 14:46:44.000000000 +0200
+++ xfwm4-4.0.5-new/mcs-plugin/xfwm4_plugin.c 2004-06-21 19:49:37.000000000
+0200
@@ -1857,12 +1857,9 @@
{
McsSetting *setting;

- const gchar *home = g_get_home_dir ();
gchar *rcfile;

- rcfile =
- g_strconcat (home, G_DIR_SEPARATOR_S, ".xfce4", G_DIR_SEPARATOR_S,
- RCDIR, G_DIR_SEPARATOR_S, RCFILE, NULL);
+ rcfile = xfce_get_userfile (RCDIR, RCFILE, NULL);
mcs_manager_add_channel_from_file (mcs_plugin->manager, CHANNEL, rcfile);
g_free (rcfile);

==========

diff -Nur xffm-4.0.5/plugin-mcs/xffm_settings_dialog.c
xffm-4.0.5-new/plugin-mcs/xffm_settings_dialog.c
--- xffm-4.0.5/plugin-mcs/xffm_settings_dialog.c 2003-09-05 05:24:13.000000000
+0200
+++ xffm-4.0.5-new/plugin-mcs/xffm_settings_dialog.c 2004-06-21
19:50:47.000000000 +0200
@@ -168,11 +168,10 @@
{
McsSetting *setting;

- const gchar *home = g_get_home_dir();
gchar *rcfile;
gint i;

- rcfile = g_strconcat(home, G_DIR_SEPARATOR_S, ".xfce4", G_DIR_SEPARATOR_S,
RCDIR, G_DIR_SEPARATOR_S, RCFILE, NULL);
+ rcfile = xfce_get_userfile(RCDIR, RCFILE, NULL);
mcs_manager_add_channel_from_file(mcs_manager, CHANNEL, rcfile);
g_free(rcfile);rcfile=NULL;

@@ -198,11 +197,10 @@

static gboolean write_options(void)
{
- const gchar *home = g_get_home_dir();
gchar *rcfile;
gboolean result;

- rcfile = g_strconcat(home, G_DIR_SEPARATOR_S, ".xfce4", G_DIR_SEPARATOR_S,
RCDIR, G_DIR_SEPARATOR_S, RCFILE, NULL);
+ rcfile = xfce_get_userfile(RCDIR, RCFILE, NULL);
result = mcs_manager_save_channel_to_file(mcs_manager, CHANNEL, rcfile);
g_free(rcfile);
rcfile=NULL;

==========

diff -Nur xfce4-iconbox-4.0.5/settings/ls_iconboxconf.c
xfce4-iconbox-4.0.5-new/settings/ls_iconboxconf.c
--- xfce4-iconbox-4.0.5/settings/ls_iconboxconf.c 2003-11-03 22:48:25.000000000
+0100
+++ xfce4-iconbox-4.0.5-new/settings/ls_iconboxconf.c 2004-06-21
19:55:23.000000000 +0200
@@ -318,14 +318,10 @@

gboolean ls_iconboxconf_write(LSIconBoxConf *plsibwcw, McsManager *pmcsm)
{
- const gchar *szHome;
gchar *szRcFile;
gboolean bErr;

- szHome = g_get_home_dir();
- szRcFile = g_strconcat(szHome, G_DIR_SEPARATOR_S, ".xfce4",
- G_DIR_SEPARATOR_S, "settings", G_DIR_SEPARATOR_S,
- "ls-iconbox.xml", NULL);
+ szRcFile = xfce_get_userfile("settings", "ls-iconbox.xml", NULL);

if(plsibwcw == NULL)
{
@@ -353,13 +349,9 @@

gboolean ls_iconboxconf_read(LSIconBoxConf *plsibwcw, McsManager *pmcsm)
{
- const gchar *szHome;
gchar *szRcFile;

- szHome = g_get_home_dir();
- szRcFile = g_strconcat(szHome, G_DIR_SEPARATOR_S, ".xfce4",
- G_DIR_SEPARATOR_S, "settings", G_DIR_SEPARATOR_S,
- "ls-iconbox.xml", NULL);
+ szRcFile = xfce_get_userfile("settings", "ls-iconbox.xml", NULL);

if(plsibwcw == NULL)
{
Comment 2 edscott editbugs 2004-07-15 19:53:25 CEST
the xffm part has been resolved before 4.0.6 release.
Comment 3 Jean-François Wauthy editbugs 2004-07-16 14:19:51 CEST
fixed in both HEAD and xfce_4_0
Comment 4 Jean-François Wauthy editbugs 2004-07-16 14:22:48 CEST
bug closed

Bug #256

Reported by:
orelien
Reported on: 2004-07-11
Last modified on: 2009-07-15

People

Assignee:
Xfce Bug Triage
CC List:
0 users

Version

Attachments

Additional information