summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-05-16 10:43:05 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-05-16 10:43:05 +0100
commit8e6332b183b31a1d77c290719fce955b310c2fa0 (patch)
tree6b530a7e0bb442b6c946d01340c86fdefb9379b5
parente713a64f5343f54445aa00b990383a151f35df72 (diff)
Remove personality file parsing
The "personality" file has been removed from the Endless images, and it was never guaranteed to be there in the first place. Code that uses an Endless "personality" is considered 2.x legacy. https://phabricator.endlessm.com/T17029
-rw-r--r--docs/reference/endless/endless-sections.txt3
-rw-r--r--endless/endless.h3
-rw-r--r--endless/eosutil.c65
3 files changed, 1 insertions, 70 deletions
diff --git a/docs/reference/endless/endless-sections.txt b/docs/reference/endless/endless-sections.txt
index 7c96978..648f270 100644
--- a/docs/reference/endless/endless-sections.txt
+++ b/docs/reference/endless/endless-sections.txt
@@ -8,7 +8,6 @@ eos_hello_sample_function
EOS_SDK_MAJOR_VERSION
EOS_SDK_MINOR_VERSION
EOS_SDK_MICRO_VERSION
-eos_get_system_personality
eos_is_composite_tv_screen
<SUBSECTION Private>
EOS_DEFINE_ENUM_TYPE
@@ -160,4 +159,4 @@ eos_get_license_file
EOS_LICENSE_PUBLIC_DOMAN
EOS_LICENSE_OWNER_PERMISSION
EOS_LICENSE_NO_LICENSE
-</SECTION> \ No newline at end of file
+</SECTION>
diff --git a/endless/endless.h b/endless/endless.h
index 2b328e2..9d0ceac 100644
--- a/endless/endless.h
+++ b/endless/endless.h
@@ -25,9 +25,6 @@ EOS_SDK_DEPRECATED_IN_0_0
gboolean eos_hello_sample_function (GFile *file,
GError **error);
-EOS_SDK_AVAILABLE_IN_0_0
-const gchar * eos_get_system_personality (void);
-
EOS_SDK_AVAILABLE_IN_0_6
gboolean eos_is_composite_tv_screen (GdkScreen *screen);
diff --git a/endless/eosutil.c b/endless/eosutil.c
index c9d9038..73b3a50 100644
--- a/endless/eosutil.c
+++ b/endless/eosutil.c
@@ -3,71 +3,6 @@
#include "endless.h"
/**
- * eos_get_system_personality:
- *
- * Retrieves the "personality" of the system.
- *
- * The personality is a unique string that identifies the installation
- * of EndlessOS for a specific country or audience. The availability of
- * certain applications, or their content, is determined by this value.
- *
- * Return value: (transfer none): a string, owned by the Endless SDK,
- * with the name of the personality. You should never free or modify
- * the returned string.
- */
-const gchar *
-eos_get_system_personality (void)
-{
- static gchar *personality;
-
- if (g_once_init_enter (&personality))
- {
- gchar *tmp;
-
- tmp = g_strdup (g_getenv ("ENDLESS_OS_PERSONALITY"));
- if (tmp != NULL && tmp[0] == '\0')
- {
- g_free (tmp);
- tmp = NULL;
- }
-
- if (tmp == NULL)
- {
- GKeyFile *personality_file = g_key_file_new ();
- char *path = g_build_filename (SYSCONFDIR,
- "EndlessOS",
- "personality.conf",
- NULL);
-
- GError *error = NULL;
- g_key_file_load_from_file (personality_file, path,
- G_KEY_FILE_NONE, &error);
-
- if (error == NULL)
- tmp = g_key_file_get_string (personality_file, "Personality",
- "PersonalityName", &error);
-
- if (error != NULL)
- {
- g_critical ("No personality defined: %s", error->message);
- g_error_free (error);
- tmp = NULL;
- }
-
- g_key_file_free (personality_file);
- g_free (path);
- }
-
- if (tmp == NULL)
- tmp = g_strdup ("default");
-
- g_once_init_leave (&personality, tmp);
- }
-
- return personality;
-}
-
-/**
* eos_is_composite_tv_screen:
* @screen: (allow-none): a #GdkScreen, or %NULL to use the default display's default screen.
*