gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_28-16


From: Pawel Kot
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_28-160-gf275845
Date: Sun, 27 Dec 2009 21:16:04 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  f2758456b6d4cd083f097159cd8a7ce48433299e (commit)
       via  82d640e6ff98c414b584a99dc5f957b124715b9f (commit)
       via  0d4fa36dfa51447efb7405cdfda52760c1887587 (commit)
       via  9743962ddbc84719fce306ca8b305ef5f00bda36 (commit)
       via  935229016602a9d67ac82a9dd6316cbef395189f (commit)
      from  edca05c30b654b5fd7dbf1a08b388b78213b1c45 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=f2758456b6d4cd083f097159cd8a7ce48433299e


commit f2758456b6d4cd083f097159cd8a7ce48433299e
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 27 22:11:25 2009 +0100

    Start converting xgnokii to freedesktop.org standards regarding file 
locations.

diff --git a/xgnokii/xgnokii_cfg.c b/xgnokii/xgnokii_cfg.c
index 930fbc6..6695c63 100644
--- a/xgnokii/xgnokii_cfg.c
+++ b/xgnokii/xgnokii_cfg.c
@@ -64,7 +64,7 @@ ConfigEntry config[] = {
 
 static void GetDefaultValues()
 {
-       const gchar *homedir;
+       const gchar *datadir;
 
        xgnokiiConfig.user.name = g_strdup("");
        xgnokiiConfig.user.title = g_strdup("");
@@ -73,9 +73,10 @@ static void GetDefaultValues()
        xgnokiiConfig.user.fax = g_strdup("");
        xgnokiiConfig.user.email = g_strdup("");
        xgnokiiConfig.user.address = g_strdup("");
-       if ((homedir = g_get_home_dir()) == NULL)
-               homedir = "";
-       xgnokiiConfig.mailbox = g_strdup_printf("%s/Mail/smsbox", homedir);
+       datadir = g_strconcat(g_get_user_data_dir(), "/gnokii/xgnokii/Mail", 
NULL);
+       if (!g_file_test(datadir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(datadir, 0700);
+       xgnokiiConfig.mailbox = g_strdup_printf("%s/smsbox", datadir);
        xgnokiiConfig.maxSIMLen = g_strdup("14");
        xgnokiiConfig.maxPhoneLen = g_strdup("16");
 }
@@ -85,7 +86,7 @@ void GUI_ReadXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        gchar *current;
        register gint len;
@@ -94,20 +95,15 @@ void GUI_ReadXConfig()
        GetDefaultValues();
 
 #ifdef WIN32
-/*  homedir = getenv("HOMEDRIVE");
-  g_strconcat(homedir, getenv("HOMEPATH"), NULL); */
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("WARNING: Can't find HOME environment variable!\n"));
-               return;
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("WARNING: Can't allocate memory for config 
reading!\n"));
-               return;
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "r")) == NULL) {
@@ -195,23 +191,20 @@ gint GUI_SaveXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        register gint i;
 
 #ifdef WIN32
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("ERROR: Can't find HOME environment variable!\n"));
-               return(1);
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("ERROR: Can't allocate memory for config 
writing!\n"));
-               return(2);
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "w")) == NULL) {

http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=82d640e6ff98c414b584a99dc5f957b124715b9f


commit f2758456b6d4cd083f097159cd8a7ce48433299e
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 27 22:11:25 2009 +0100

    Start converting xgnokii to freedesktop.org standards regarding file 
locations.

diff --git a/xgnokii/xgnokii_cfg.c b/xgnokii/xgnokii_cfg.c
index 930fbc6..6695c63 100644
--- a/xgnokii/xgnokii_cfg.c
+++ b/xgnokii/xgnokii_cfg.c
@@ -64,7 +64,7 @@ ConfigEntry config[] = {
 
 static void GetDefaultValues()
 {
-       const gchar *homedir;
+       const gchar *datadir;
 
        xgnokiiConfig.user.name = g_strdup("");
        xgnokiiConfig.user.title = g_strdup("");
@@ -73,9 +73,10 @@ static void GetDefaultValues()
        xgnokiiConfig.user.fax = g_strdup("");
        xgnokiiConfig.user.email = g_strdup("");
        xgnokiiConfig.user.address = g_strdup("");
-       if ((homedir = g_get_home_dir()) == NULL)
-               homedir = "";
-       xgnokiiConfig.mailbox = g_strdup_printf("%s/Mail/smsbox", homedir);
+       datadir = g_strconcat(g_get_user_data_dir(), "/gnokii/xgnokii/Mail", 
NULL);
+       if (!g_file_test(datadir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(datadir, 0700);
+       xgnokiiConfig.mailbox = g_strdup_printf("%s/smsbox", datadir);
        xgnokiiConfig.maxSIMLen = g_strdup("14");
        xgnokiiConfig.maxPhoneLen = g_strdup("16");
 }
@@ -85,7 +86,7 @@ void GUI_ReadXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        gchar *current;
        register gint len;
@@ -94,20 +95,15 @@ void GUI_ReadXConfig()
        GetDefaultValues();
 
 #ifdef WIN32
-/*  homedir = getenv("HOMEDRIVE");
-  g_strconcat(homedir, getenv("HOMEPATH"), NULL); */
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("WARNING: Can't find HOME environment variable!\n"));
-               return;
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("WARNING: Can't allocate memory for config 
reading!\n"));
-               return;
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "r")) == NULL) {
@@ -195,23 +191,20 @@ gint GUI_SaveXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        register gint i;
 
 #ifdef WIN32
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("ERROR: Can't find HOME environment variable!\n"));
-               return(1);
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("ERROR: Can't allocate memory for config 
writing!\n"));
-               return(2);
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "w")) == NULL) {

http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=0d4fa36dfa51447efb7405cdfda52760c1887587


commit f2758456b6d4cd083f097159cd8a7ce48433299e
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 27 22:11:25 2009 +0100

    Start converting xgnokii to freedesktop.org standards regarding file 
locations.

diff --git a/xgnokii/xgnokii_cfg.c b/xgnokii/xgnokii_cfg.c
index 930fbc6..6695c63 100644
--- a/xgnokii/xgnokii_cfg.c
+++ b/xgnokii/xgnokii_cfg.c
@@ -64,7 +64,7 @@ ConfigEntry config[] = {
 
 static void GetDefaultValues()
 {
-       const gchar *homedir;
+       const gchar *datadir;
 
        xgnokiiConfig.user.name = g_strdup("");
        xgnokiiConfig.user.title = g_strdup("");
@@ -73,9 +73,10 @@ static void GetDefaultValues()
        xgnokiiConfig.user.fax = g_strdup("");
        xgnokiiConfig.user.email = g_strdup("");
        xgnokiiConfig.user.address = g_strdup("");
-       if ((homedir = g_get_home_dir()) == NULL)
-               homedir = "";
-       xgnokiiConfig.mailbox = g_strdup_printf("%s/Mail/smsbox", homedir);
+       datadir = g_strconcat(g_get_user_data_dir(), "/gnokii/xgnokii/Mail", 
NULL);
+       if (!g_file_test(datadir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(datadir, 0700);
+       xgnokiiConfig.mailbox = g_strdup_printf("%s/smsbox", datadir);
        xgnokiiConfig.maxSIMLen = g_strdup("14");
        xgnokiiConfig.maxPhoneLen = g_strdup("16");
 }
@@ -85,7 +86,7 @@ void GUI_ReadXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        gchar *current;
        register gint len;
@@ -94,20 +95,15 @@ void GUI_ReadXConfig()
        GetDefaultValues();
 
 #ifdef WIN32
-/*  homedir = getenv("HOMEDRIVE");
-  g_strconcat(homedir, getenv("HOMEPATH"), NULL); */
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("WARNING: Can't find HOME environment variable!\n"));
-               return;
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("WARNING: Can't allocate memory for config 
reading!\n"));
-               return;
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "r")) == NULL) {
@@ -195,23 +191,20 @@ gint GUI_SaveXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        register gint i;
 
 #ifdef WIN32
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("ERROR: Can't find HOME environment variable!\n"));
-               return(1);
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("ERROR: Can't allocate memory for config 
writing!\n"));
-               return(2);
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "w")) == NULL) {

http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=9743962ddbc84719fce306ca8b305ef5f00bda36


commit f2758456b6d4cd083f097159cd8a7ce48433299e
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 27 22:11:25 2009 +0100

    Start converting xgnokii to freedesktop.org standards regarding file 
locations.

diff --git a/xgnokii/xgnokii_cfg.c b/xgnokii/xgnokii_cfg.c
index 930fbc6..6695c63 100644
--- a/xgnokii/xgnokii_cfg.c
+++ b/xgnokii/xgnokii_cfg.c
@@ -64,7 +64,7 @@ ConfigEntry config[] = {
 
 static void GetDefaultValues()
 {
-       const gchar *homedir;
+       const gchar *datadir;
 
        xgnokiiConfig.user.name = g_strdup("");
        xgnokiiConfig.user.title = g_strdup("");
@@ -73,9 +73,10 @@ static void GetDefaultValues()
        xgnokiiConfig.user.fax = g_strdup("");
        xgnokiiConfig.user.email = g_strdup("");
        xgnokiiConfig.user.address = g_strdup("");
-       if ((homedir = g_get_home_dir()) == NULL)
-               homedir = "";
-       xgnokiiConfig.mailbox = g_strdup_printf("%s/Mail/smsbox", homedir);
+       datadir = g_strconcat(g_get_user_data_dir(), "/gnokii/xgnokii/Mail", 
NULL);
+       if (!g_file_test(datadir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(datadir, 0700);
+       xgnokiiConfig.mailbox = g_strdup_printf("%s/smsbox", datadir);
        xgnokiiConfig.maxSIMLen = g_strdup("14");
        xgnokiiConfig.maxPhoneLen = g_strdup("16");
 }
@@ -85,7 +86,7 @@ void GUI_ReadXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        gchar *current;
        register gint len;
@@ -94,20 +95,15 @@ void GUI_ReadXConfig()
        GetDefaultValues();
 
 #ifdef WIN32
-/*  homedir = getenv("HOMEDRIVE");
-  g_strconcat(homedir, getenv("HOMEPATH"), NULL); */
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("WARNING: Can't find HOME environment variable!\n"));
-               return;
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("WARNING: Can't allocate memory for config 
reading!\n"));
-               return;
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "r")) == NULL) {
@@ -195,23 +191,20 @@ gint GUI_SaveXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        register gint i;
 
 #ifdef WIN32
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("ERROR: Can't find HOME environment variable!\n"));
-               return(1);
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("ERROR: Can't allocate memory for config 
writing!\n"));
-               return(2);
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "w")) == NULL) {

http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=935229016602a9d67ac82a9dd6316cbef395189f


commit f2758456b6d4cd083f097159cd8a7ce48433299e
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 27 22:11:25 2009 +0100

    Start converting xgnokii to freedesktop.org standards regarding file 
locations.

diff --git a/xgnokii/xgnokii_cfg.c b/xgnokii/xgnokii_cfg.c
index 930fbc6..6695c63 100644
--- a/xgnokii/xgnokii_cfg.c
+++ b/xgnokii/xgnokii_cfg.c
@@ -64,7 +64,7 @@ ConfigEntry config[] = {
 
 static void GetDefaultValues()
 {
-       const gchar *homedir;
+       const gchar *datadir;
 
        xgnokiiConfig.user.name = g_strdup("");
        xgnokiiConfig.user.title = g_strdup("");
@@ -73,9 +73,10 @@ static void GetDefaultValues()
        xgnokiiConfig.user.fax = g_strdup("");
        xgnokiiConfig.user.email = g_strdup("");
        xgnokiiConfig.user.address = g_strdup("");
-       if ((homedir = g_get_home_dir()) == NULL)
-               homedir = "";
-       xgnokiiConfig.mailbox = g_strdup_printf("%s/Mail/smsbox", homedir);
+       datadir = g_strconcat(g_get_user_data_dir(), "/gnokii/xgnokii/Mail", 
NULL);
+       if (!g_file_test(datadir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(datadir, 0700);
+       xgnokiiConfig.mailbox = g_strdup_printf("%s/smsbox", datadir);
        xgnokiiConfig.maxSIMLen = g_strdup("14");
        xgnokiiConfig.maxPhoneLen = g_strdup("16");
 }
@@ -85,7 +86,7 @@ void GUI_ReadXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        gchar *current;
        register gint len;
@@ -94,20 +95,15 @@ void GUI_ReadXConfig()
        GetDefaultValues();
 
 #ifdef WIN32
-/*  homedir = getenv("HOMEDRIVE");
-  g_strconcat(homedir, getenv("HOMEPATH"), NULL); */
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("WARNING: Can't find HOME environment variable!\n"));
-               return;
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("WARNING: Can't allocate memory for config 
reading!\n"));
-               return;
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "r")) == NULL) {
@@ -195,23 +191,20 @@ gint GUI_SaveXConfig()
 {
        FILE *file;
        gchar *line;
-       const gchar *homedir;
+       const gchar *confdir;
        gchar *rcfile;
        register gint i;
 
 #ifdef WIN32
-       homedir = g_get_home_dir();
-       rcfile = g_strconcat(homedir, "\\_xgnokiirc", NULL);
+       confdir = g_strconcat(getenv("APPDATA"), "\\gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(config, "\\xgnokii-config", NULL);
 #else
-       if ((homedir = g_get_home_dir()) == NULL) {
-               g_print(_("ERROR: Can't find HOME environment variable!\n"));
-               return(1);
-       }
-
-       if ((rcfile = g_strconcat(homedir, "/.xgnokiirc", NULL)) == NULL) {
-               g_print(_("ERROR: Can't allocate memory for config 
writing!\n"));
-               return(2);
-       }
+       confdir = g_strconcat(g_get_user_config_dir(), "/gnokii", NULL);
+       if (!g_file_test(confdir, G_FILE_TEST_IS_DIR))
+               g_mkdir_with_parents(confdir, 0700);
+       rcfile = g_strconcat(confdir, "/xgnokii-config", NULL);
 #endif
 
        if ((file = fopen(rcfile, "w")) == NULL) {

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog              |    7 ++--
 INSTALL                |    2 +-
 common/phones/atgen.c  |   19 +++++++----
 common/phones/atsam.c  |   81 ++++++++++++++++++++++++++++++++++++++++++++++++
 include/phones/atgen.h |    6 +++-
 include/phones/atsam.h |    1 +
 xgnokii/xgnokii_cfg.c  |   53 +++++++++++++------------------
 7 files changed, 127 insertions(+), 42 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs




reply via email to

[Prev in Thread] Current Thread [Next in Thread]