Fix name incoherency: rename Edje->part to group.

It is very confusing to have "part" there and in the methods call,
because we want the group name, not part.


SVN revision: 35483
This commit is contained in:
Gustavo Sverzut Barbieri 2008-08-14 18:04:43 +00:00
parent 97eed7e2dc
commit a85c8a5f2b
6 changed files with 24 additions and 24 deletions

View File

@ -203,8 +203,8 @@ extern "C" {
EAPI const char *edje_object_data_get (Evas_Object *obj, const char *key); EAPI const char *edje_object_data_get (Evas_Object *obj, const char *key);
/* edje_load.c */ /* edje_load.c */
EAPI int edje_object_file_set (Evas_Object *obj, const char *file, const char *part); EAPI int edje_object_file_set (Evas_Object *obj, const char *file, const char *group);
EAPI void edje_object_file_get (Evas_Object *obj, const char **file, const char **part); EAPI void edje_object_file_get (Evas_Object *obj, const char **file, const char **group);
EAPI int edje_object_load_error_get (Evas_Object *obj); EAPI int edje_object_load_error_get (Evas_Object *obj);
/* edje_program.c */ /* edje_program.c */

View File

@ -4256,7 +4256,7 @@ edje_edit_print_internal_status(Evas_Object *obj)
printf("*** Edje\n"); printf("*** Edje\n");
printf(" path: '%s'\n", ed->path); printf(" path: '%s'\n", ed->path);
printf(" part: '%s'\n", ed->part); printf(" group: '%s'\n", ed->group);
printf(" parent: '%s'\n", ed->parent); printf(" parent: '%s'\n", ed->parent);
printf("\n*** Parts [table:%d list:%d]\n", ed->table_parts_size, printf("\n*** Parts [table:%d list:%d]\n", ed->table_parts_size,

View File

@ -9,7 +9,7 @@ static Evas_Bool _edje_file_collection_hash_foreach(const Evas_Hash *hash, const
#ifdef EDJE_PROGRAM_CACHE #ifdef EDJE_PROGRAM_CACHE
static int _edje_collection_free_prog_cache_matches_free_cb(Evas_Hash *hash, const char *key, void *data, void *fdata); static int _edje_collection_free_prog_cache_matches_free_cb(Evas_Hash *hash, const char *key, void *data, void *fdata);
#endif #endif
static int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *part, Evas_List *group_path); static int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Evas_List *group_path);
static void _cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char *source); static void _cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char *source);
static Evas_List *_edje_swallows_collect(Edje *ed); static Evas_List *_edje_swallows_collect(Edje *ed);
@ -20,7 +20,7 @@ static Evas_List *_edje_swallows_collect(Edje *ed);
/** Sets the EET file and group to load @a obj from /** Sets the EET file and group to load @a obj from
* @param obj A valid Evas_Object handle * @param obj A valid Evas_Object handle
* @param file The path to the EET file * @param file The path to the EET file
* @param part The group name in the Edje * @param group The group name in the Edje
* @return 0 on Error\n * @return 0 on Error\n
* 1 on Success and sets EDJE_LOAD_ERROR_NONE * 1 on Success and sets EDJE_LOAD_ERROR_NONE
* *
@ -29,27 +29,27 @@ static Evas_List *_edje_swallows_collect(Edje *ed);
* specifies the file and group name to load @a obj from. * specifies the file and group name to load @a obj from.
*/ */
EAPI int EAPI int
edje_object_file_set(Evas_Object *obj, const char *file, const char *part) edje_object_file_set(Evas_Object *obj, const char *file, const char *group)
{ {
return _edje_object_file_set_internal(obj, file, part, NULL); return _edje_object_file_set_internal(obj, file, group, NULL);
} }
/* FIXDOC: Verify/expand doc. */ /* FIXDOC: Verify/expand doc. */
/** Get the file and group name that @a obj was loaded from /** Get the file and group name that @a obj was loaded from
* @param obj A valid Evas_Object handle * @param obj A valid Evas_Object handle
* @param file A pointer to store a pointer to the filename in * @param file A pointer to store a pointer to the filename in
* @param part A pointer to store a pointer to the group name in * @param group A pointer to store a pointer to the group name in
* *
* This gets the EET file location and group for the given Evas_Object. * This gets the EET file location and group for the given Evas_Object.
* If @a obj is either not an edje file, or has not had its file/group set * If @a obj is either not an edje file, or has not had its file/group set
* using edje_object_file_set(), then both @a file and @a part will be set * using edje_object_file_set(), then both @a file and @a group will be set
* to NULL. * to NULL.
* *
* It is valid to pass in NULL for either @a file or @a part if you are not * It is valid to pass in NULL for either @a file or @a group if you are not
* interested in one of the values. * interested in one of the values.
*/ */
EAPI void EAPI void
edje_object_file_get(Evas_Object *obj, const char **file, const char **part) edje_object_file_get(Evas_Object *obj, const char **file, const char **group)
{ {
Edje *ed; Edje *ed;
@ -57,11 +57,11 @@ edje_object_file_get(Evas_Object *obj, const char **file, const char **part)
if (!ed) if (!ed)
{ {
if (file) *file = NULL; if (file) *file = NULL;
if (part) *part = NULL; if (group) *group = NULL;
return; return;
} }
if (file) *file = ed->path; if (file) *file = ed->path;
if (part) *part = ed->part; if (group) *group = ed->group;
} }
/* FIXDOC: Verify. return error? */ /* FIXDOC: Verify. return error? */
@ -229,7 +229,7 @@ _edje_programs_patterns_init(Edje *ed)
} }
static int static int
_edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *part, Evas_List *group_path) _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Evas_List *group_path)
{ {
Edje *ed; Edje *ed;
int n; int n;
@ -240,9 +240,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
ed = _edje_fetch(obj); ed = _edje_fetch(obj);
if (!ed) return 0; if (!ed) return 0;
if (!file) file = ""; if (!file) file = "";
if (!part) part = ""; if (!group) group = "";
if (((ed->path) && (!strcmp(file, ed->path))) && if (((ed->path) && (!strcmp(file, ed->path))) &&
(ed->part) && (!strcmp(part, ed->part))) (ed->group) && (!strcmp(group, ed->group)))
return 1; return 1;
old_swallows = _edje_swallows_collect(ed); old_swallows = _edje_swallows_collect(ed);
@ -251,9 +251,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
_edje_file_del(ed); _edje_file_del(ed);
if (ed->path) evas_stringshare_del(ed->path); if (ed->path) evas_stringshare_del(ed->path);
if (ed->part) evas_stringshare_del(ed->part); if (ed->group) evas_stringshare_del(ed->group);
ed->path = evas_stringshare_add(file); ed->path = evas_stringshare_add(file);
ed->part = evas_stringshare_add(part); ed->group = evas_stringshare_add(group);
ed->load_error = EDJE_LOAD_ERROR_NONE; ed->load_error = EDJE_LOAD_ERROR_NONE;
_edje_file_add(ed); _edje_file_add(ed);
@ -489,7 +489,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *p
const char *group_path_entry = evas_stringshare_add(rp->part->source); const char *group_path_entry = evas_stringshare_add(rp->part->source);
if (!group_path) if (!group_path)
{ {
group_path = evas_list_append(NULL, evas_stringshare_add(part)); group_path = evas_list_append(NULL, evas_stringshare_add(group));
group_path_started = 1; group_path_started = 1;
} }
/* make sure that this group isn't already in the tree of parents */ /* make sure that this group isn't already in the tree of parents */
@ -590,7 +590,7 @@ void
_edje_file_add(Edje *ed) _edje_file_add(Edje *ed)
{ {
if (_edje_edd_edje_file == NULL) return; if (_edje_edd_edje_file == NULL) return;
ed->file = _edje_cache_file_coll_open(ed->path, ed->part, ed->file = _edje_cache_file_coll_open(ed->path, ed->group,
&(ed->load_error), &(ed->load_error),
&(ed->collection)); &(ed->collection));

View File

@ -88,10 +88,10 @@ _edje_del(Edje *ed)
_edje_callbacks_patterns_clean(ed); _edje_callbacks_patterns_clean(ed);
_edje_file_del(ed); _edje_file_del(ed);
if (ed->path) evas_stringshare_del(ed->path); if (ed->path) evas_stringshare_del(ed->path);
if (ed->part) evas_stringshare_del(ed->part); if (ed->group) evas_stringshare_del(ed->group);
if (ed->parent) evas_stringshare_del(ed->parent); if (ed->parent) evas_stringshare_del(ed->parent);
ed->path = NULL; ed->path = NULL;
ed->part = NULL; ed->group = NULL;
if ((ed->actions) || (ed->pending_actions)) if ((ed->actions) || (ed->pending_actions))
{ {
_edje_animators = evas_list_remove(_edje_animators, ed); _edje_animators = evas_list_remove(_edje_animators, ed);

View File

@ -622,7 +622,7 @@ typedef struct _Edje_Signals_Sources_Patterns Edje_Signals_Sources_Patterns;
struct _Edje struct _Edje
{ {
const char *path; const char *path;
const char *part; const char *group;
const char *parent; const char *parent;
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;

View File

@ -1245,7 +1245,7 @@ edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Co
if ((ed->w > 4000) || (ed->h > 4000)) if ((ed->w > 4000) || (ed->h > 4000))
{ {
printf("EDJE ERROR: file %s, group %s has a non-fixed part. add fixed: 1 1; ???\n", printf("EDJE ERROR: file %s, group %s has a non-fixed part. add fixed: 1 1; ???\n",
ed->path, ed->part); ed->path, ed->group);
if (pep) if (pep)
printf(" Problem part is: %s\n", pep->part->name); printf(" Problem part is: %s\n", pep->part->name);
printf(" Will recalc min size not allowing broken parts to affect the result.\n"); printf(" Will recalc min size not allowing broken parts to affect the result.\n");