everything: gadget icon and minor cleanups.

SVN revision: 65111
This commit is contained in:
Gustavo Sverzut Barbieri 2011-11-13 00:07:35 +00:00
parent f790929ea2
commit b4572fddde
6 changed files with 41 additions and 27 deletions

View File

@ -4,7 +4,9 @@ MODULE = everything
# data files for the module
filesdir = $(libdir)/enlightenment/modules/$(MODULE)
files_DATA = \
e-module-$(MODULE).edj module.desktop
e-module-$(MODULE).edj \
e-module-$(MODULE)-start.edj \
module.desktop
EXTRA_DIST = $(files_DATA) everything.pc.in module.desktop.in

Binary file not shown.

View File

@ -22,6 +22,7 @@ static int _e_module_evry_log_dom = -1;
Evry_API *evry = NULL;
Evry_Config *evry_conf = NULL;
int _evry_events[NUM_EVRY_EVENTS];
E_Module *_mod_evry = NULL;
/* module setup */
EAPI E_Module_Api e_modapi =
@ -47,6 +48,8 @@ e_modapi_init(E_Module *m)
return NULL;
}
_mod_evry = m;
/* add module supplied action */
act = e_action_add("everything");
if (act)
@ -243,6 +246,8 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
printf("%d %s\n", it->ref, it->label);
#endif
_mod_evry = NULL;
return 1;
}

View File

@ -348,6 +348,7 @@ extern Evry_API *evry;
extern Evry_History *evry_hist;
extern Evry_Config *evry_conf;
extern int _evry_events[NUM_EVRY_EVENTS];
extern E_Module *_mod_evry;
/*** E Module ***/
EAPI void *e_modapi_init (E_Module *m);

View File

@ -56,7 +56,7 @@ static const E_Gadcon_Client_Class _gadcon_class =
};
static Eina_Bool
_illume_running()
_illume_running(void)
{
/* hack to find out out if illume is running, dont grab if
this is the case... */
@ -173,14 +173,14 @@ _gc_label(E_Gadcon_Client_Class *client_class __UNUSED__)
static Evas_Object *
_gc_icon(E_Gadcon_Client_Class *client_class __UNUSED__, Evas *evas __UNUSED__)
{
/* Evas_Object *o; */
/* char buf[4096];
*
* o = edje_object_add(evas);
* snprintf(buf, sizeof(buf), "%s/e-module-start.edj",
* e_module_dir_get(start_module));
* edje_object_file_set(o, buf, "icon"); */
return NULL;
Evas_Object *o;
char buf[PATH_MAX];
o = edje_object_add(evas);
snprintf(buf, sizeof(buf), "%s/e-module-everything-start.edj",
e_module_dir_get(_mod_evry));
edje_object_file_set(o, buf, "icon");
return o;
}
static Gadget_Config *
@ -203,10 +203,7 @@ _conf_item_get(const char *id)
static const char *
_gc_id_new(E_Gadcon_Client_Class *client_class __UNUSED__)
{
Gadget_Config *gc = NULL;
gc = _conf_item_get(NULL);
Gadget_Config *gc = _conf_item_get(NULL);
return gc->id;
}

View File

@ -445,13 +445,17 @@ evry_util_icon_get(Evry_Item *it, Evas *e)
Evas_Object *o = NULL;
if (it->icon_get)
o = it->icon_get(it, e);
if (o) return o;
{
o = it->icon_get(it, e);
if (o) return o;
}
if ((it->icon) && (it->icon[0] == '/'))
o = evry_icon_theme_get(it->icon, e);
if (o) return o;
{
o = evry_icon_theme_get(it->icon, e);
if (o) return o;
}
if (CHECK_TYPE(it, EVRY_TYPE_FILE))
{
const char *icon;
@ -460,8 +464,10 @@ evry_util_icon_get(Evry_Item *it, Evas *e)
GET_FILE(file, it);
if (it->browseable)
o = evry_icon_theme_get("folder", e);
if (o) return o;
{
o = evry_icon_theme_get("folder", e);
if (o) return o;
}
if ((!it->icon) && (file->mime) &&
(/*(!strncmp(file->mime, "image/", 6)) || */
@ -512,15 +518,18 @@ evry_util_icon_get(Evry_Item *it, Evas *e)
}
if (it->icon)
o = evry_icon_theme_get(it->icon, e);
if (o) return o;
{
o = evry_icon_theme_get(it->icon, e);
if (o) return o;
}
if (it->browseable)
o = evry_icon_theme_get("folder", e);
if (o) return o;
{
o = evry_icon_theme_get("folder", e);
if (o) return o;
}
o = evry_icon_theme_get("unknown", e);
return o;
}