E_CONFIG_VAL(D, T, edge_flip_dragging, INT); /**/
E_CONFIG_VAL(D, T, use_composite, INT); /**/
E_CONFIG_VAL(D, T, language, STR); /**/
+ E_CONFIG_VAL(D, T, desklock_language, STR); /**/
E_CONFIG_LIST(D, T, modules, _e_config_module_edd); /**/
E_CONFIG_LIST(D, T, font_fallbacks, _e_config_font_fallback_edd); /**/
E_CONFIG_LIST(D, T, font_defaults, _e_config_font_default_edd); /**/
if (ecf->desktop_default_background) eina_stringshare_del(ecf->desktop_default_background);
if (ecf->desktop_default_name) eina_stringshare_del(ecf->desktop_default_name);
if (ecf->language) eina_stringshare_del(ecf->language);
+ eina_stringshare_del(ecf->desklock_language);
if (ecf->transition_start) eina_stringshare_del(ecf->transition_start);
if (ecf->transition_desk) eina_stringshare_del(ecf->transition_desk);
if (ecf->transition_change) eina_stringshare_del(ecf->transition_change);
/* 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 0x0154
+#define E_CONFIG_FILE_GENERATION 0x0155
#define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION)
struct _E_Config
int edge_flip_dragging; // GUI
int use_composite; // GUI
const char *language; // GUI
+ const char *desklock_language; // GUI
Eina_List *modules; // GUI
Eina_List *font_fallbacks; // GUI
Eina_List *font_defaults; // GUI
ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
_e_desklock_cb_custom_desklock_exit, NULL);
e_util_library_path_strip();
+ if (e_config->desklock_language)
+ e_intl_language_set(e_config->desklock_language);
_e_custom_desklock_exe =
ecore_exe_run(e_config->desklock_custom_desklock_cmd, NULL);
e_util_library_path_restore();
return 0;
}
works:
-
+ if (e_config->desklock_language)
+ e_intl_language_set(e_config->desklock_language);
total_zone_num = _e_desklock_zone_num_get();
EINA_LIST_FOREACH(managers, l, man)
{
if ((!edd) && (!_e_custom_desklock_exe)) return;
+ if (e_config->desklock_language)
+ e_intl_language_set(e_config->language);
+
_e_desklock_state = EINA_FALSE;
ev = E_NEW(E_Event_Desklock, 1);
ev->on = 0;
typedef struct _E_Intl_Region_Node E_Intl_Region_Node;
static void *_create_data(E_Config_Dialog *cfd);
+static void *_create_desklock_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static int _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
Evas_Object *mod_list;
Evas_Object *locale_entry;
- }
- gui;
+ } gui;
+ Eina_Bool desklock : 1;
};
const E_Intl_Pair basic_language_predefined_pairs[] = {
return cfd;
}
+E_Config_Dialog *
+e_int_config_desklock_intl(E_Container *con, const char *params __UNUSED__)
+{
+ E_Config_Dialog *cfd;
+ E_Config_Dialog_View *v;
+
+ if (e_config_dialog_find("E", "language/desklock_language_settings")) return NULL;
+ v = E_NEW(E_Config_Dialog_View, 1);
+
+ v->create_cfdata = _create_desklock_data;
+ v->free_cfdata = _free_data;
+ v->advanced.create_widgets = _advanced_create_widgets;
+ v->advanced.apply_cfdata = _advanced_apply_data;
+ v->basic.create_widgets = _basic_create_widgets;
+ v->basic.apply_cfdata = _basic_apply_data;
+
+ cfd = e_config_dialog_new(con,
+ _("Desklock Language Settings"),
+ "E", "language/desklock_language_settings",
+ "preferences-desktop-locale", 0, v, NULL);
+ return cfd;
+}
+
/* Build hash tables used for locale navigation. The locale information is
* gathered using the locale -a command.
*
return cfdata;
}
+static void *
+_create_desklock_data(E_Config_Dialog *cfd)
+{
+ E_Config_Dialog_Data *cfdata;
+
+ cfdata = _create_data(cfd);
+ E_FREE(cfdata->cur_language);
+ if (e_config->desklock_language)
+ cfdata->cur_language = strdup(e_config->desklock_language);
+ cfdata->desklock = 1;
+ return cfdata;
+}
+
static void
_free_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata)
{
{
if (cfdata->cur_language)
{
- if (e_config->language) eina_stringshare_del(e_config->language);
- e_config->language = NULL;
- if ((cfdata->cur_language) && (cfdata->cur_language[0]))
- e_config->language = eina_stringshare_add(cfdata->cur_language);
- e_intl_language_set(e_config->language);
- _lc_check();
+ if (cfdata->desklock)
+ {
+ if (e_config->desklock_language) eina_stringshare_del(e_config->desklock_language);
+ e_config->desklock_language = NULL;
+ if ((cfdata->cur_language) && (cfdata->cur_language[0]))
+ e_config->desklock_language = eina_stringshare_add(cfdata->cur_language);
+ }
+ else
+ {
+ if (e_config->language) eina_stringshare_del(e_config->language);
+ e_config->language = NULL;
+ if ((cfdata->cur_language) && (cfdata->cur_language[0]))
+ e_config->language = eina_stringshare_add(cfdata->cur_language);
+ e_intl_language_set(e_config->language);
+ _lc_check();
+ }
}
e_config_save_queue();
{
if (cfdata->cur_language)
{
- if (e_config->language) eina_stringshare_del(e_config->language);
- e_config->language = NULL;
- if ((cfdata->cur_language) && (cfdata->cur_language[0]))
- e_config->language = eina_stringshare_add(cfdata->cur_language);
- e_intl_language_set(e_config->language);
- _lc_check();
+ if (cfdata->desklock)
+ {
+ if (e_config->desklock_language) eina_stringshare_del(e_config->desklock_language);
+ e_config->desklock_language = NULL;
+ if ((cfdata->cur_language) && (cfdata->cur_language[0]))
+ e_config->desklock_language = eina_stringshare_add(cfdata->cur_language);
+ }
+ else
+ {
+ if (e_config->language) eina_stringshare_del(e_config->language);
+ e_config->language = NULL;
+ if ((cfdata->cur_language) && (cfdata->cur_language[0]))
+ e_config->language = eina_stringshare_add(cfdata->cur_language);
+ e_intl_language_set(e_config->language);
+ _lc_check();
+ }
}
e_config_save_queue();
#define E_INT_CONFIG_INTL_H
E_Config_Dialog *e_int_config_intl(E_Container *con, const char *params __UNUSED__);
+E_Config_Dialog *e_int_config_desklock_intl(E_Container *con, const char *params __UNUSED__);
#endif
#endif
_("Language Settings"), NULL,
"preferences-desktop-locale",
e_int_config_intl);
+ e_configure_registry_item_add("language/desklock_language_settings", 10,
+ _("Desklock Language Settings"), NULL,
+ "preferences-desktop-locale",
+ e_int_config_desklock_intl);
e_configure_registry_item_add("language/input_method_settings", 20,
_("Input Method Settings"), NULL,
"preferences-imc", e_int_config_imc);
e_object_del(E_OBJECT(cfd));
while ((cfd = e_config_dialog_get("E", "language/language_settings")))
e_object_del(E_OBJECT(cfd));
+ while ((cfd = e_config_dialog_get("E", "language/desklock_language_settings")))
+ e_object_del(E_OBJECT(cfd));
e_configure_registry_item_del("language/input_method_settings");
+ e_configure_registry_item_del("language/desklock_language_settings");
e_configure_registry_item_del("language/language_settings");
e_configure_registry_category_del("language");
conf_module = NULL;