use plugin instance macro

SVN revision: 49008
This commit is contained in:
Hannes Janetzek 2010-05-19 14:47:12 +00:00
parent fcdabe2023
commit f00a498e24
1 changed files with 4 additions and 9 deletions

View File

@ -567,19 +567,16 @@ _browse(Evry_Plugin *plugin, const Evry_Item *it)
{ {
Plugin *p = NULL; Plugin *p = NULL;
if (!it || (it && !CHECK_TYPE(it, EVRY_TYPE_FILE))) if (!it || !(CHECK_TYPE(it, EVRY_TYPE_FILE)))
return NULL; return NULL;
/* GET_PLUGIN(parent, plugin); */
GET_FILE(file, it); GET_FILE(file, it);
if (!evry->file_path_get(file) || if (!evry->file_path_get(file) ||
!ecore_file_is_dir(file->path)) !ecore_file_is_dir(file->path))
return NULL; return NULL;
p = E_NEW(Plugin, 1); EVRY_PLUGIN_INSTANCE(p, plugin);
p->base = *plugin;
p->base.items = NULL;
p->directory = eina_stringshare_add(file->path); p->directory = eina_stringshare_add(file->path);
p->parent = EINA_TRUE; p->parent = EINA_TRUE;
@ -1071,7 +1068,7 @@ _recentf_browse(Evry_Plugin *plugin, const Evry_Item *it)
{ {
Plugin *p = NULL; Plugin *p = NULL;
if (!it || (it && !CHECK_TYPE(it, EVRY_TYPE_FILE))) if (!it || !CHECK_TYPE(it, EVRY_TYPE_FILE))
return NULL; return NULL;
GET_FILE(file, it); GET_FILE(file, it);
@ -1098,9 +1095,7 @@ _recentf_begin(Evry_Plugin *plugin, const Evry_Item *it)
if (it && !CHECK_TYPE(it, EVRY_TYPE_ACTION)) if (it && !CHECK_TYPE(it, EVRY_TYPE_ACTION))
return NULL; return NULL;
p = E_NEW(Plugin, 1); EVRY_PLUGIN_INSTANCE(p, plugin);
p->base = *plugin;
p->base.items = NULL;
p->parent = EINA_FALSE; p->parent = EINA_FALSE;
if (it) if (it)