diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-03-27 16:08:12 +0200 | 
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2017-03-27 16:08:12 +0200 | 
| commit | ce74c570b7efbe1a68d15f9caafa6341db3f2ecf (patch) | |
| tree | aaaae25216112ffaaed8fd4be53808c64ec21c96 | |
| parent | bd827a75f97ca17e9391a25890e8f593a4299fd9 (diff) | |
compiz-config-profile-setter: use 'ubuntu' as default if nothing else is found
(bzr r4213.4.6)
| -rw-r--r-- | tools/compiz_config_profile_setter.c | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/tools/compiz_config_profile_setter.c b/tools/compiz_config_profile_setter.c index d197096ba..a94f9c424 100644 --- a/tools/compiz_config_profile_setter.c +++ b/tools/compiz_config_profile_setter.c @@ -19,6 +19,9 @@  #include <ccs.h>  #include <gio/gio.h> +#define COMPIZ_CONFIG_PROFILE_ENV "COMPIZ_CONFIG_PROFILE" +#define COMPIZ_CONFIG_DEFAULT_PROFILE "ubuntu" +  extern const CCSInterfaceTable ccsDefaultInterfaceTable;  static gboolean @@ -83,7 +86,7 @@ set_compiz_profile (CCSContext *ccs_context, const gchar *profile_name)  int main(int argc, char *argv[])  {  CCSContext *context; - const gchar *profile; + const gchar *profile, *ccs_profile_env;  if (argc < 2)  { @@ -91,6 +94,13 @@ int main(int argc, char *argv[])  return 1;  } + ccs_profile_env = g_getenv (COMPIZ_CONFIG_PROFILE_ENV); + + if (!ccs_profile_env || ccs_profile_env[0] == '\0') + { + g_setenv (COMPIZ_CONFIG_PROFILE_ENV, COMPIZ_CONFIG_DEFAULT_PROFILE, TRUE); + } +  context = ccsContextNew (0, &ccsDefaultInterfaceTable);  profile = argv[1]; | 
