fix bug with browsing folders: create view also when there is no plugin

SVN revision: 49365
This commit is contained in:
Hannes Janetzek 2010-06-01 02:01:01 +00:00
parent abaa7c3627
commit 0638007a59
3 changed files with 34 additions and 24 deletions

View File

@ -711,16 +711,18 @@ evry_plugin_update(Evry_Plugin *p, int action)
_evry_plugin_select(s, NULL); _evry_plugin_select(s, NULL);
} }
/* plugin is visible */ if ((s->plugin && sel->state == s) &&
if ((sel->state == s) && /* plugin is current */
((s->plugin == p) || ((s->plugin == p) ||
(s->plugin == s->aggregator))) /* plugin items are shown in aggregator */
((s->plugin == s->aggregator) && p->config->aggregate)))
{ {
_evry_selector_update(sel); _evry_selector_update(sel);
if (_evry_view_update(s)) 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); _evry_view_show(s->view, 0);
} }
/* switch back to subject selector when no current items */ /* switch back to subject selector when no current items */
@ -842,23 +844,25 @@ _evry_window_new(E_Zone *zone, E_Zone_Edge edge)
} }
else else
{ {
int to_side = 0;
switch (edge) switch (edge)
{ {
case E_ZONE_EDGE_TOP_LEFT: case E_ZONE_EDGE_TOP_LEFT:
x = 3 - offset_s; x = to_side - offset_s;
y = 3 - offset_s; y = to_side - offset_s;
break; break;
case E_ZONE_EDGE_TOP_RIGHT: case E_ZONE_EDGE_TOP_RIGHT:
x = zone->w - (mw + offset_s + 3); x = zone->w - (mw + offset_s + to_side);
y = 3 - offset_s; y = to_side - offset_s;
break; break;
case E_ZONE_EDGE_BOTTOM_RIGHT: case E_ZONE_EDGE_BOTTOM_RIGHT:
x = zone->w - (mw + offset_s + 3); x = zone->w - (mw + offset_s + to_side);
y = zone->h - (mh + offset_s + 3); y = zone->h - (mh + offset_s + to_side);
break; break;
case E_ZONE_EDGE_BOTTOM_LEFT: case E_ZONE_EDGE_BOTTOM_LEFT:
x = 3 - offset_s; x = to_side - offset_s;
y = zone->h - (mh + offset_s + 3); y = zone->h - (mh + offset_s + to_side);
break; break;
default: default:

View File

@ -151,7 +151,7 @@ evry_plug_collection_init(void)
plugin_config.min_query = 0; plugin_config.min_query = 0;
plugin_config.top_level = EINA_TRUE; plugin_config.top_level = EINA_TRUE;
plugin_config.aggregate = EINA_FALSE; 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"); COLLECTION_PLUGIN = evry_type_register("COLLECTION_PLUGIN");

View File

@ -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); Smart_Data *sd = evas_object_smart_data_get(obj);
sd->x = x; sd->x = x;
sd->y = y; sd->y = y;
/* printf("move %p %d %d\n", sd, x, y); */
_e_smart_reconfigure(obj); _e_smart_reconfigure(obj);
} }
@ -1497,23 +1496,30 @@ _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
View *v; View *v;
Ecore_Event_Handler *h; Ecore_Event_Handler *h;
if (!s->plugin)
return NULL;
v = E_NEW(View, 1); v = E_NEW(View, 1);
v->view = *view; v->view = *view;
v->view.clear_timer = NULL; v->view.clear_timer = NULL;
v->state = s; v->state = s;
v->evas = evas_object_evas_get(swallow); v->evas = evas_object_evas_get(swallow);
if ((s->selector->states->next) && if (s->plugin)
((s->plugin->config->view_mode < 0) || {
(!strcmp(s->plugin->name, N_("All"))))) if ((s->selector->states->next) &&
v->mode = parent->mode; ((s->plugin->config->view_mode < 0) ||
else if (s->plugin->config->view_mode >= 0) (!strcmp(s->plugin->name, N_("All")))))
v->mode = s->plugin->config->view_mode; 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 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; v->plugin = s->plugin;