forked from enlightenment/enlightenment
parent
6a88a855d9
commit
90304246b4
|
@ -4,35 +4,35 @@
|
|||
|
||||
typedef struct _E_Imc_Update_Data E_Imc_Update_Data;
|
||||
|
||||
static void *_create_data (E_Config_Dialog *cfd);
|
||||
static void _free_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_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 *_basic_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_advanced_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_data(E_Config_Dialog *cfd);
|
||||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_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 *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
|
||||
/* Basic Callbacks */
|
||||
static int _basic_list_sort_cb (const void *d1, const void *d2);
|
||||
static void _e_imc_list_change_cb (void *data, Evas_Object *obj);
|
||||
static void _e_imc_setup_cb (void *data, void *data2);
|
||||
static int _basic_list_sort_cb(const void *d1, const void *d2);
|
||||
static void _e_imc_list_change_cb(void *data, Evas_Object *obj);
|
||||
static void _e_imc_setup_cb(void *data, void *data2);
|
||||
|
||||
/* Advanced Callbacks */
|
||||
static void _cb_dir (void *data, Evas_Object *obj);
|
||||
static void _cb_button_up (void *data1, void *data2);
|
||||
static void _cb_new (void *data, void *data2);
|
||||
static void _cb_dir(void *data, Evas_Object *obj);
|
||||
static void _cb_button_up(void *data1, void *data2);
|
||||
static void _cb_new(void *data, void *data2);
|
||||
|
||||
static void _cb_files_changed (void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_changed(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_selection_change(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_files_changed (void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_files_deleted (void *data, Evas_Object *obj, void *event_info);
|
||||
static void _e_imc_adv_setup_cb (void *data, void *data2);
|
||||
static void _cb_files_files_changed(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _cb_files_files_deleted(void *data, Evas_Object *obj, void *event_info);
|
||||
static void _e_imc_adv_setup_cb(void *data, void *data2);
|
||||
|
||||
static void _e_imc_change_enqueue (E_Config_Dialog_Data *cfdata);
|
||||
static void _e_imc_entry_change_cb (void *data, Evas_Object *obj);
|
||||
static void _e_imc_form_fill (E_Config_Dialog_Data *cfdata);
|
||||
static const char* _e_imc_file_name_new_get (void);
|
||||
static Eina_Bool _change_hash_free_cb (const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
|
||||
static Eina_Bool _change_hash_apply_cb (const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata __UNUSED__);
|
||||
static void _e_imc_change_enqueue(E_Config_Dialog_Data *cfdata);
|
||||
static void _e_imc_entry_change_cb(void *data, Evas_Object *obj);
|
||||
static void _e_imc_form_fill(E_Config_Dialog_Data *cfdata);
|
||||
static const char *_e_imc_file_name_new_get(void);
|
||||
static Eina_Bool _change_hash_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
|
||||
static Eina_Bool _change_hash_apply_cb(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata __UNUSED__);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
{
|
||||
|
@ -204,7 +204,7 @@ _basic_list_sort_cb(const void *d1, const void *d2)
|
|||
if (!d1) return 1;
|
||||
if (!d2) return -1;
|
||||
|
||||
return (strcmp((const char*)d1, (const char*)d2));
|
||||
return strcmp((const char *)d1, (const char *)d2);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -263,7 +263,7 @@ _e_imc_setup_cb(void *data, void *data2 __UNUSED__)
|
|||
if (!exe)
|
||||
{
|
||||
e_util_dialog_show(_("Run Error"),
|
||||
_( "Enlightenment was unable to fork a child process:<br>"
|
||||
_("Enlightenment was unable to fork a child process:<br>"
|
||||
"<br>%s<br>"),
|
||||
cmd);
|
||||
}
|
||||
|
@ -378,6 +378,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
e_dialog_resizable_set(cfd->dia, 1);
|
||||
return o;
|
||||
}
|
||||
|
||||
/*** End Basic Dialog Logic ***/
|
||||
|
||||
/*** Start Advanced Dialog Logic ***/
|
||||
|
@ -511,7 +512,7 @@ _e_imc_adv_setup_cb(void *data, void *data2 __UNUSED__)
|
|||
if (!exe)
|
||||
{
|
||||
e_util_dialog_show(_("Run Error"),
|
||||
_( "Enlightenment was unable to fork a child process:<br>"
|
||||
_("Enlightenment was unable to fork a child process:<br>"
|
||||
"<br>%s<br>"), cmd);
|
||||
}
|
||||
}
|
||||
|
@ -639,6 +640,7 @@ _cb_files_files_deleted(void *data, Evas_Object *obj __UNUSED__, void *event_inf
|
|||
|
||||
evas_object_smart_callback_call(cfdata->o_fm, "selection_change", cfdata);
|
||||
}
|
||||
|
||||
/** End IMC FM2 Callbacks **/
|
||||
|
||||
/** Start IMC Utility Functions **/
|
||||
|
@ -728,7 +730,7 @@ _e_imc_change_enqueue(E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
|
||||
/* Get a new filename, and create the new file */
|
||||
static const char*
|
||||
static const char *
|
||||
_e_imc_file_name_new_get(void)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
|
@ -744,6 +746,7 @@ _e_imc_file_name_new_get(void)
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/** End IMC Utility Functions **/
|
||||
|
||||
/** Import Dialog **/
|
||||
|
@ -945,3 +948,4 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
|
|||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,14 +25,14 @@ struct _E_Config_Dialog_Data
|
|||
char *file;
|
||||
};
|
||||
|
||||
static void _imc_import_cb_delete (E_Win *win);
|
||||
static void _imc_import_cb_resize (E_Win *win);
|
||||
static void _imc_import_cb_wid_focus (void *data, Evas_Object *obj);
|
||||
static void _imc_import_cb_selected (void *data, Evas_Object *obj);
|
||||
static void _imc_import_cb_changed (void *data, Evas_Object *obj);
|
||||
static void _imc_import_cb_ok (void *data, void *data2);
|
||||
static void _imc_import_cb_close (void *data, void *data2);
|
||||
static void _imc_import_cb_key_down (void *data, Evas *e, Evas_Object *obj,
|
||||
static void _imc_import_cb_delete(E_Win *win);
|
||||
static void _imc_import_cb_resize(E_Win *win);
|
||||
static void _imc_import_cb_wid_focus(void *data, Evas_Object *obj);
|
||||
static void _imc_import_cb_selected(void *data, Evas_Object *obj);
|
||||
static void _imc_import_cb_changed(void *data, Evas_Object *obj);
|
||||
static void _imc_import_cb_ok(void *data, void *data2);
|
||||
static void _imc_import_cb_close(void *data, void *data2);
|
||||
static void _imc_import_cb_key_down(void *data, Evas *e, Evas_Object *obj,
|
||||
void *event);
|
||||
|
||||
E_Win *
|
||||
|
@ -86,19 +86,19 @@ e_int_config_imc_import(E_Config_Dialog *parent)
|
|||
mask = 0;
|
||||
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
|
||||
if (!kg)
|
||||
fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
|
||||
fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
|
||||
mask = evas_key_modifier_mask_get(evas, "Shift");
|
||||
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
|
||||
if (!kg)
|
||||
fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
|
||||
fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
|
||||
mask = 0;
|
||||
kg = evas_object_key_grab(o, "Return", mask, ~mask, 0);
|
||||
if (!kg)
|
||||
fprintf(stderr,"ERROR: unable to redirect \"Return\" key events to object %p.\n", o);
|
||||
fprintf(stderr, "ERROR: unable to redirect \"Return\" key events to object %p.\n", o);
|
||||
mask = 0;
|
||||
kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
|
||||
if (!kg)
|
||||
fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
|
||||
fprintf(stderr, "ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
|
||||
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
|
||||
_imc_import_cb_key_down, import);
|
||||
|
||||
|
@ -376,3 +376,4 @@ _imc_import_cb_key_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
|
|||
if (o) e_widget_activate(o);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,33 +4,33 @@ typedef struct _E_Intl_Pair E_Intl_Pair;
|
|||
typedef struct _E_Intl_Langauge_Node E_Intl_Language_Node;
|
||||
typedef struct _E_Intl_Region_Node E_Intl_Region_Node;
|
||||
|
||||
static void *_create_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);
|
||||
static int _basic_apply_data (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static void *_create_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);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
|
||||
static void _ilist_basic_language_cb_change (void *data, Evas_Object *obj);
|
||||
static void _ilist_language_cb_change (void *data, Evas_Object *obj);
|
||||
static void _ilist_region_cb_change (void *data, Evas_Object *obj);
|
||||
static void _ilist_codeset_cb_change (void *data, Evas_Object *obj);
|
||||
static void _ilist_modifier_cb_change (void *data, Evas_Object *obj);
|
||||
static int _lang_list_sort (const void *data1, const void *data2);
|
||||
static void _lang_list_load (void *data);
|
||||
static int _region_list_sort (const void *data1, const void *data2);
|
||||
static void _region_list_load (void *data);
|
||||
static int _basic_lang_list_sort (const void *data1, const void *data2);
|
||||
static void _ilist_basic_language_cb_change(void *data, Evas_Object *obj);
|
||||
static void _ilist_language_cb_change(void *data, Evas_Object *obj);
|
||||
static void _ilist_region_cb_change(void *data, Evas_Object *obj);
|
||||
static void _ilist_codeset_cb_change(void *data, Evas_Object *obj);
|
||||
static void _ilist_modifier_cb_change(void *data, Evas_Object *obj);
|
||||
static int _lang_list_sort(const void *data1, const void *data2);
|
||||
static void _lang_list_load(void *data);
|
||||
static int _region_list_sort(const void *data1, const void *data2);
|
||||
static void _region_list_load(void *data);
|
||||
static int _basic_lang_list_sort(const void *data1, const void *data2);
|
||||
|
||||
/* Fill the clear lists, fill with language, select */
|
||||
/* Update lanague */
|
||||
static void _cfdata_language_go (const char *lang, const char *region, const char *codeset, const char *modifier, E_Config_Dialog_Data *cfdata);
|
||||
static Eina_Bool _lang_hash_cb (const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata);
|
||||
static Eina_Bool _region_hash_cb (const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata);
|
||||
static Eina_Bool _language_hash_free_cb (const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
|
||||
static Eina_Bool _region_hash_free_cb (const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
|
||||
static void _intl_current_locale_setup (E_Config_Dialog_Data *cfdata);
|
||||
static const char *_intl_charset_upper_get (const char *charset);
|
||||
static void _cfdata_language_go(const char *lang, const char *region, const char *codeset, const char *modifier, E_Config_Dialog_Data *cfdata);
|
||||
static Eina_Bool _lang_hash_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata);
|
||||
static Eina_Bool _region_hash_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata);
|
||||
static Eina_Bool _language_hash_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
|
||||
static Eina_Bool _region_hash_free_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__);
|
||||
static void _intl_current_locale_setup(E_Config_Dialog_Data *cfdata);
|
||||
static const char *_intl_charset_upper_get(const char *charset);
|
||||
|
||||
struct _E_Intl_Pair
|
||||
{
|
||||
|
@ -98,7 +98,7 @@ struct _E_Config_Dialog_Data
|
|||
gui;
|
||||
};
|
||||
|
||||
const E_Intl_Pair basic_language_predefined_pairs[ ] = {
|
||||
const E_Intl_Pair basic_language_predefined_pairs[] = {
|
||||
{"ar_AE.UTF-8", "ara_flag.png", "العربية"},
|
||||
{"bg_BG.UTF-8", "bg_flag.png", "Български"},
|
||||
{"ca_ES.UTF-8", "cat_flag.png", "Català"},
|
||||
|
@ -140,7 +140,7 @@ const E_Intl_Pair basic_language_predefined_pairs[ ] = {
|
|||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
const E_Intl_Pair language_predefined_pairs[ ] = {
|
||||
const E_Intl_Pair language_predefined_pairs[] = {
|
||||
{"aa", NULL, "Qafár af"},
|
||||
{"af", NULL, "Afrikaans"},
|
||||
{"ak", NULL, "Akan"},
|
||||
|
@ -279,7 +279,7 @@ const E_Intl_Pair language_predefined_pairs[ ] = {
|
|||
{ NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
const E_Intl_Pair region_predefined_pairs[ ] = {
|
||||
const E_Intl_Pair region_predefined_pairs[] = {
|
||||
{ "AF", NULL, "Afghanistan"},
|
||||
{ "AX", NULL, "Åland"},
|
||||
{ "AL", NULL, "Shqipëria"},
|
||||
|
@ -536,7 +536,7 @@ const E_Intl_Pair region_predefined_pairs[ ] = {
|
|||
* make sure that locale -a output gets converted to upper-case form in
|
||||
* all situations just to be safe.
|
||||
*/
|
||||
const E_Intl_Pair charset_predefined_pairs[ ] = {
|
||||
const E_Intl_Pair charset_predefined_pairs[] = {
|
||||
/* These are in locale -a but not in charsets */
|
||||
{"cp1255", NULL, "CP1255"},
|
||||
{"euc", NULL, "EUC"},
|
||||
|
@ -742,8 +742,8 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
|||
/* Add codeset to the region hash node if it exists */
|
||||
if (locale_parts->codeset)
|
||||
{
|
||||
const char * cs = NULL;
|
||||
const char * cs_trans;
|
||||
const char *cs = NULL;
|
||||
const char *cs_trans;
|
||||
|
||||
cs_trans = _intl_charset_upper_get(locale_parts->codeset);
|
||||
if (!cs_trans)
|
||||
|
@ -1150,7 +1150,7 @@ _ilist_language_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
|||
static void
|
||||
_ilist_region_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog_Data * cfdata;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
char locale[32];
|
||||
|
||||
cfdata = data;
|
||||
|
@ -1173,7 +1173,7 @@ _ilist_region_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
|||
static void
|
||||
_ilist_codeset_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog_Data * cfdata;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
char locale[32];
|
||||
|
||||
cfdata = data;
|
||||
|
@ -1193,7 +1193,7 @@ _ilist_codeset_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
|||
static void
|
||||
_ilist_modifier_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog_Data * cfdata;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
char locale[32];
|
||||
|
||||
cfdata = data;
|
||||
|
@ -1279,7 +1279,7 @@ _cfdata_language_go(const char *lang, const char *region, const char *codeset, c
|
|||
|
||||
for (next = reg_node->available_codesets; next; next = next->next)
|
||||
{
|
||||
const char * cs;
|
||||
const char *cs;
|
||||
|
||||
cs = next->data;
|
||||
e_widget_ilist_append(cfdata->gui.cs_list, NULL, cs, NULL, NULL, cs);
|
||||
|
@ -1294,7 +1294,7 @@ _cfdata_language_go(const char *lang, const char *region, const char *codeset, c
|
|||
|
||||
for (next = reg_node->available_modifiers; next; next = next->next)
|
||||
{
|
||||
const char * mod;
|
||||
const char *mod;
|
||||
|
||||
mod = next->data;
|
||||
e_widget_ilist_append(cfdata->gui.mod_list, NULL, mod, NULL, NULL, mod);
|
||||
|
@ -1305,7 +1305,6 @@ _cfdata_language_go(const char *lang, const char *region, const char *codeset, c
|
|||
count = e_widget_ilist_count(cfdata->gui.mod_list);
|
||||
e_widget_ilist_selected_set(cfdata->gui.mod_list, count - 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
e_widget_ilist_go(cfdata->gui.cs_list);
|
||||
|
@ -1406,7 +1405,7 @@ _lang_list_sort(const void *data1, const void *data2)
|
|||
if (!ln2->lang_name) return -1;
|
||||
trans2 = ln2->lang_name;
|
||||
|
||||
return (strcmp(trans1, trans2));
|
||||
return strcmp(trans1, trans2);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1483,7 +1482,7 @@ _region_list_sort(const void *data1, const void *data2)
|
|||
if (!rn2->region_name) return -1;
|
||||
trans2 = rn2->region_name;
|
||||
|
||||
return (strcmp(trans1, trans2));
|
||||
return strcmp(trans1, trans2);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1547,7 +1546,7 @@ _basic_lang_list_sort(const void *data1, const void *data2)
|
|||
if (!ln2->locale_translation) return -1;
|
||||
trans2 = ln2->locale_translation;
|
||||
|
||||
return (strcmp(trans1, trans2));
|
||||
return strcmp(trans1, trans2);
|
||||
}
|
||||
|
||||
const char *
|
||||
|
@ -1566,3 +1565,4 @@ _intl_charset_upper_get(const char *charset)
|
|||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,3 +49,4 @@ e_modapi_save(E_Module *m __UNUSED__)
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue