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);
}
/* 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:

View File

@ -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");

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);
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;