diff --git a/config/default/e.src b/config/default/e.src index 705c2e919..25c86fea9 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 4b864245e..ca90b7ab1 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 961d1c2d2..8a178982d 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 0545aaea6..099853956 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 30a6d3df4..7afaeb37b 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