#define EVRY_ACTN(_item) ((Evry_Action *) _item)
#define EVRY_PLUGIN(_plugin) ((Evry_Plugin *) _plugin)
#define EVRY_VIEW(_view) ((Evry_View *) _view)
+#define EVRY_FILE(_it) ((Evry_Item_File *) _it)
-#define CHECK_TYPE(_item, _type) (((Evry_Item *)_item)->type == _type)
-#define CHECK_SUBTYPE(_item, _type) (((Evry_Item *)_item)->subtype == _type)
+#define CHECK_TYPE(_item, _type) \
+ (((Evry_Item *)_item)->type && ((Evry_Item *)_item)->type == _type)
+
+#define CHECK_SUBTYPE(_item, _type) \
+ (((Evry_Item *)_item)->subtype && ((Evry_Item *)_item)->subtype == _type)
#define GET_APP(_app, _item) Evry_Item_App *_app = (Evry_Item_App *) _item
#define GET_FILE(_file, _item) Evry_Item_File *_file = (Evry_Item_File *) _item
EAPI void evry_util_file_detail_set(Evry_Item_File *file);
EAPI Eina_Bool evry_util_module_config_check(const char *module_name, int conf, int epoch, int version);
EAPI Evas_Object *evry_util_icon_get(Evry_Item *it, Evas *e);
+EAPI const char *evry_file_path_get(Evry_Item *it);
/* e_mod_main.c */
/* set plugin trigger and view mode first before register !*/
GET_PLUGIN(p, plugin);
Evry_Action *act;
Eina_List *l;
- Evry_Type type;
if (!it || !it->type) return NULL;
- type = it->type;
-
if (it->browseable)
{
EINA_LIST_FOREACH(evry_conf->actions, l, act)
EINA_LIST_FOREACH(evry_conf->actions, l, act)
{
- if ((!act->it1.type) ||
- ((act->it1.type == type) &&
- (!act->check_item || act->check_item(act, it))))
+ if (((!act->it1.type) ||
+ (CHECK_TYPE(it, act->it1.type)) ||
+ (CHECK_SUBTYPE(it, act->it1.type))) &&
+ (!act->check_item || act->check_item(act, it)))
{
act->base.plugin = plugin;
if (s->plugin->view_mode == VIEW_MODE_NONE)
{
- if ((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
- (!strcmp(key, "2")))
+ if (((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
+ (!strcmp(key, "2"))) || !strcmp(key, "XF86Back"))
{
if (v->mode == VIEW_MODE_LIST)
v->mode = VIEW_MODE_DETAIL;
_update_frame(v->span);
goto end;
}
- else if ((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
- (!strcmp(key, "3")))
+ else if (((ev->modifiers & ECORE_EVENT_MODIFIER_CTRL) &&
+ (!strcmp(key, "3"))) || !strcmp(key, "XF86Forward"))
{
if (v->mode != VIEW_MODE_THUMB)
{
ns[strindex]=0; /* terminate it */
return ns;
}
+
+EAPI const char*
+evry_file_path_get(Evry_Item *it)
+{
+ const char *tmp;
+ char *path;
+
+ GET_FILE(file, it);
+
+ if (file->path)
+ return file->path;
+
+ if (!strncmp(file->url, "file://", 7))
+ tmp = file->url + 7;
+ else return NULL;
+
+ if (!(path = evry_util_unescape(tmp, 0)))
+ return NULL;
+ file->path = eina_stringshare_add(path);
+
+ E_FREE(path);
+
+ return file->path;
+}
Tab_View *v = data;
double da;
- double spd = (8.0 / (double)e_config->framerate);
+ double spd = (15.0 / (double)e_config->framerate);
if (spd > 0.9) spd = 0.9;
int wait = 0;
if (!v->state || !v->state->cur_plugins) return 0;
- if (!strcmp(key, "Next"))
- {
- _plugin_next(v);
- return 1;
- }
- else if (!strcmp(key, "Prior"))
- {
- _plugin_prev(v);
- return -1;
- }
- else if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT)
+ /* if (!strcmp(key, "Next"))
+ * {
+ * _plugin_next(v);
+ * return 1;
+ * }
+ * else if (!strcmp(key, "Prior"))
+ * {
+ * _plugin_prev(v);
+ * return -1;
+ * }
+ * else */
+ if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT)
{
if (!strcmp(key, "Left"))
{