summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-04 10:45:51 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2013-02-04 10:45:51 +0000
commitd1be1fc8bb591b1f9eb330342523436552a95e26 (patch)
treeef75e1c4d89222c6de634364ec009a98e75da497
parent43d18ff1559ccbee73a7780033b602169c7f99b2 (diff)
downloadenlightenment-d1be1fc8bb591b1f9eb330342523436552a95e26.tar.gz
add profile types to config so it will be possible to determine what type of config the user started with
SVN revision: 83588
-rw-r--r--config/default/e.src1
-rw-r--r--config/mobile/e.src1
-rw-r--r--config/standard/e.src1
-rw-r--r--src/bin/e_config.c12
-rw-r--r--src/bin/e_config.h11
5 files changed, 25 insertions, 1 deletions
diff --git a/config/default/e.src b/config/default/e.src
index 705c2e9190..25c86fea97 100644
--- a/config/default/e.src
+++ b/config/default/e.src
@@ -1,5 +1,6 @@
group "E_Config" struct {
value "config_version" int: 1000000;
+ value "config_type" uint: 0; // this profile seems to just be super minimalist
value "show_splash" int: 0;
value "init_default_theme" string: "default.edj";
value "desktop_default_name" string: "%i-%i";
diff --git a/config/mobile/e.src b/config/mobile/e.src
index 4b864245e6..ca90b7ab1d 100644
--- a/config/mobile/e.src
+++ b/config/mobile/e.src
@@ -1,5 +1,6 @@
group "E_Config" struct {
value "config_version" int: 1000000;
+ value "config_type" uint: 1;
value "show_splash" int: 1;
value "init_default_theme" string: "default.edj";
value "desktop_default_name" string: "%i-%i";
diff --git a/config/standard/e.src b/config/standard/e.src
index 961d1c2d27..8a178982dc 100644
--- a/config/standard/e.src
+++ b/config/standard/e.src
@@ -1,5 +1,6 @@
group "E_Config" struct {
value "config_version" int: 1000000;
+ value "config_type" uint: 3;
value "show_splash" int: 1;
value "init_default_theme" string: "default.edj";
value "desktop_default_name" string: "%i-%i";
diff --git a/src/bin/e_config.c b/src/bin/e_config.c
index 0545aaea6e..099853956b 100644
--- a/src/bin/e_config.c
+++ b/src/bin/e_config.c
@@ -521,6 +521,7 @@ _e_config_edd_init(Eina_Bool old)
#define D _e_config_edd
/**/ /* == already configurable via ipc */
E_CONFIG_VAL(D, T, config_version, INT); /**/
+ E_CONFIG_VAL(D, T, config_type, UINT); /**/
E_CONFIG_VAL(D, T, show_splash, INT); /**/
E_CONFIG_VAL(D, T, init_default_theme, STR); /**/
E_CONFIG_VAL(D, T, desktop_default_background, STR); /**/
@@ -1208,6 +1209,17 @@ e_config_load(void)
#undef SET
e_config_domain_save("e_bindings", _e_config_binding_edd, e_bindings);
}
+ CONFIG_VERSION_CHECK(8)
+ {
+ if (!e_config->config_type)
+ {
+ /* I guess this probably isn't great, but whatever */
+ if (eina_list_count(e_bindings->key_bindings) > 2)
+ e_config->config_type = E_CONFIG_PROFILE_TYPE_DESKTOP;
+ else
+ e_config->config_type = E_CONFIG_PROFILE_TYPE_TABLET;
+ }
+ }
}
if (!e_config->remember_internal_fm_windows)
e_config->remember_internal_fm_windows = !!(e_config->remember_internal_windows & E_REMEMBER_INTERNAL_FM_WINS);
diff --git a/src/bin/e_config.h b/src/bin/e_config.h
index 30a6d3df4f..7afaeb37b9 100644
--- a/src/bin/e_config.h
+++ b/src/bin/e_config.h
@@ -29,6 +29,14 @@ typedef struct _E_Event_Config_Icon_Theme E_Event_Config_Icon_Theme;
typedef struct E_Config_Bindings E_Config_Bindings;
+typedef enum
+{
+ E_CONFIG_PROFILE_TYPE_NONE,
+ E_CONFIG_PROFILE_TYPE_MOBILE,
+ E_CONFIG_PROFILE_TYPE_TABLET,
+ E_CONFIG_PROFILE_TYPE_DESKTOP
+} E_Config_Profile_Type;
+
#else
#ifndef E_CONFIG_H
#define E_CONFIG_H
@@ -40,7 +48,7 @@ typedef struct E_Config_Bindings E_Config_Bindings;
/* increment this whenever a new set of config values are added but the users
* config doesn't need to be wiped - simply new values need to be put in
*/
-#define E_CONFIG_FILE_GENERATION 7
+#define E_CONFIG_FILE_GENERATION 8
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH * 1000000) + E_CONFIG_FILE_GENERATION)
#define E_CONFIG_BINDINGS_VERSION 0 // DO NOT INCREMENT UNLESS YOU WANT TO WIPE ALL BINDINGS!!!!!
@@ -48,6 +56,7 @@ typedef struct E_Config_Bindings E_Config_Bindings;
struct _E_Config
{
int config_version; // INTERNAL
+ E_Config_Profile_Type config_type; // INTERNAL
int show_splash; // GUI
const char *init_default_theme; // GUI
const char *desktop_default_background; // GUI