[anjuta/gsettings-migration] project-wizard: Don't use name, email and homedir preferences
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gsettings-migration] project-wizard: Don't use name, email and homedir preferences
- Date: Tue, 19 Oct 2010 13:52:04 +0000 (UTC)
commit f2f461b3e040baa63773862c7fa466aa3d89812e
Author: Johannes Schmid <jhs gnome org>
Date: Tue Oct 19 15:14:59 2010 +0200
project-wizard: Don't use name, email and homedir preferences
Instead we use what glib provides but we still have to find a way for the correct email
(libfolks might work but is an additional dependency)
plugins/project-wizard/druid.c | 28 ++++++----------------------
1 files changed, 6 insertions(+), 22 deletions(-)
---
diff --git a/plugins/project-wizard/druid.c b/plugins/project-wizard/druid.c
index 95380a3..662efa7 100644
--- a/plugins/project-wizard/druid.c
+++ b/plugins/project-wizard/druid.c
@@ -1112,33 +1112,17 @@ npw_druid_add_default_property (NPWDruid* druid)
/* Add default base project directory */
value = npw_value_heap_find_value (druid->values, ANJUTA_PROJECT_DIRECTORY_PROPERTY);
- s = anjuta_preferences_get (pref, "project_directory");
- npw_value_set_value (value, s == NULL ? "~" : s, NPW_VALID_VALUE);
- g_free (s);
+ npw_value_set_value (value, g_get_home_dir (), NPW_VALID_VALUE);
/* Add user name */
value = npw_value_heap_find_value (druid->values, USER_NAME_PROPERTY);
- s = anjuta_preferences_get (pref, "user_name");
- if (!s || strlen(s) == 0)
- {
- s = (gchar *)g_get_real_name();
- npw_value_set_value (value, s, NPW_VALID_VALUE);
- }
- else
- {
- npw_value_set_value (value, s, NPW_VALID_VALUE);
- g_free (s);
- }
+ s = (gchar *)g_get_real_name();
+ npw_value_set_value (value, s, NPW_VALID_VALUE);
/* Add Email address */
value = npw_value_heap_find_value (druid->values, EMAIL_ADDRESS_PROPERTY);
- s = anjuta_preferences_get (pref, "user_email");
- /* If Email address not defined in Preferences */
- if (!s || strlen(s) == 0)
- {
- if (!(s = getenv("USERNAME")) || strlen(s) == 0)
- s = getenv("USER");
- s = g_strconcat(s, "@", getenv("HOSTNAME"), NULL);
- }
+
+ /* FIXME: We need a default way for the mail */
+ s = g_strconcat(g_get_user_name (), "@", g_get_host_name (), NULL);
npw_value_set_value (value, s, NPW_VALID_VALUE);
g_free (s);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]