From 0638007a59a8907cd0660f438c7bcde32463ddfe Mon Sep 17 00:00:00 2001 From: Hannes Janetzek Date: Tue, 1 Jun 2010 02:01:01 +0000 Subject: [PATCH] fix bug with browsing folders: create view also when there is no plugin SVN revision: 49365 --- src/modules/everything/evry.c | 28 +++++++++++++++------------ src/modules/everything/evry_plug_collection.c | 2 +- src/modules/everything/evry_view.c | 28 ++++++++++++++++----------- 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/src/modules/everything/evry.c b/src/modules/everything/evry.c index 8624cd2..435b119 100644 --- a/src/modules/everything/evry.c +++ b/src/modules/everything/evry.c @@ -711,16 +711,18 @@ evry_plugin_update(Evry_Plugin *p, int action) _evry_plugin_select(s, NULL); } - /* plugin is visible */ - if ((sel->state == s) && + if ((s->plugin && sel->state == s) && + /* plugin is current */ ((s->plugin == p) || - (s->plugin == s->aggregator))) + /* plugin items are shown in aggregator */ + ((s->plugin == s->aggregator) && p->config->aggregate))) { _evry_selector_update(sel); if (_evry_view_update(s)) + /* XXX when there is a case where view disappears + check this one! is swallow always visible ? */ _evry_view_show(s->view, 0); - } /* switch back to subject selector when no current items */ @@ -842,23 +844,25 @@ _evry_window_new(E_Zone *zone, E_Zone_Edge edge) } else { + int to_side = 0; + switch (edge) { case E_ZONE_EDGE_TOP_LEFT: - x = 3 - offset_s; - y = 3 - offset_s; + x = to_side - offset_s; + y = to_side - offset_s; break; case E_ZONE_EDGE_TOP_RIGHT: - x = zone->w - (mw + offset_s + 3); - y = 3 - offset_s; + x = zone->w - (mw + offset_s + to_side); + y = to_side - offset_s; break; case E_ZONE_EDGE_BOTTOM_RIGHT: - x = zone->w - (mw + offset_s + 3); - y = zone->h - (mh + offset_s + 3); + x = zone->w - (mw + offset_s + to_side); + y = zone->h - (mh + offset_s + to_side); break; case E_ZONE_EDGE_BOTTOM_LEFT: - x = 3 - offset_s; - y = zone->h - (mh + offset_s + 3); + x = to_side - offset_s; + y = zone->h - (mh + offset_s + to_side); break; default: diff --git a/src/modules/everything/evry_plug_collection.c b/src/modules/everything/evry_plug_collection.c index 61a4cc7..210637e 100644 --- a/src/modules/everything/evry_plug_collection.c +++ b/src/modules/everything/evry_plug_collection.c @@ -151,7 +151,7 @@ evry_plug_collection_init(void) plugin_config.min_query = 0; plugin_config.top_level = EINA_TRUE; plugin_config.aggregate = EINA_FALSE; - plugin_config.view_mode = VIEW_MODE_NONE; + plugin_config.view_mode = VIEW_MODE_DETAIL; COLLECTION_PLUGIN = evry_type_register("COLLECTION_PLUGIN"); diff --git a/src/modules/everything/evry_view.c b/src/modules/everything/evry_view.c index bf74bcf..7dcf93f 100644 --- a/src/modules/everything/evry_view.c +++ b/src/modules/everything/evry_view.c @@ -541,7 +541,6 @@ _e_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y) Smart_Data *sd = evas_object_smart_data_get(obj); sd->x = x; sd->y = y; - /* printf("move %p %d %d\n", sd, x, y); */ _e_smart_reconfigure(obj); } @@ -1497,23 +1496,30 @@ _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow) View *v; Ecore_Event_Handler *h; - if (!s->plugin) - return NULL; - v = E_NEW(View, 1); v->view = *view; v->view.clear_timer = NULL; v->state = s; v->evas = evas_object_evas_get(swallow); - if ((s->selector->states->next) && - ((s->plugin->config->view_mode < 0) || - (!strcmp(s->plugin->name, N_("All"))))) - v->mode = parent->mode; - else if (s->plugin->config->view_mode >= 0) - v->mode = s->plugin->config->view_mode; + if (s->plugin) + { + if ((s->selector->states->next) && + ((s->plugin->config->view_mode < 0) || + (!strcmp(s->plugin->name, N_("All"))))) + v->mode = parent->mode; + else if (s->plugin->config->view_mode >= 0) + v->mode = s->plugin->config->view_mode; + else + v->mode = evry_conf->view_mode; + } else - v->mode = evry_conf->view_mode; + { + if (s->selector->states->next) + v->mode = parent->mode; + else + v->mode = evry_conf->view_mode; + } v->plugin = s->plugin; -- 2.7.4