fix segv if no per-zeon-config found!

SVN revision: 45158
This commit is contained in:
Carsten Haitzler 2010-01-15 04:40:08 +00:00
parent 4f9aead4e7
commit d4c9dd55e6
2 changed files with 13 additions and 8 deletions

View File

@ -236,4 +236,5 @@ e_illume_zone_config_get(int id)
cz->mode.side = 0;
il_cfg->policy.zones = eina_list_append(il_cfg->policy.zones, cz);
e_mod_config_save();
return cz;
}

View File

@ -90,16 +90,20 @@ e_modapi_init(E_Module *m)
/* create a new quickpanel */
if (!(qp = e_quickpanel_new(zone))) continue;
quickpanels = eina_list_append(quickpanels, qp);
mode = ECORE_X_ILLUME_MODE_SINGLE;
cz = e_illume_zone_config_get(zone->id);
if (cz->mode.dual == 0)
mode = ECORE_X_ILLUME_MODE_SINGLE;
else
if (cz)
{
if (cz->mode.side == 0)
mode = ECORE_X_ILLUME_MODE_DUAL_TOP;
else
mode = ECORE_X_ILLUME_MODE_DUAL_LEFT;
if (cz->mode.dual == 0)
mode = ECORE_X_ILLUME_MODE_SINGLE;
else
{
if (cz->mode.side == 0)
mode = ECORE_X_ILLUME_MODE_DUAL_TOP;
else
mode = ECORE_X_ILLUME_MODE_DUAL_LEFT;
}
}
ecore_x_e_illume_mode_set(zone->black_win, mode);
zones[i++] = zone->black_win;