elementary: Simplifies code and removes redundant duplicated code.

Patch by Igor Murzov <e-mail@date.by>


SVN revision: 77396
This commit is contained in:
Cedric BAIL 2012-10-04 02:43:57 +00:00
parent f79c9bb374
commit 4e92316193
3 changed files with 6 additions and 30 deletions

View File

@ -41,27 +41,13 @@ _activate(Evas_Object *obj)
{
elm_layout_signal_emit(obj, "elm,state,check,on", "elm");
if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
{
if (!elm_layout_text_get(obj, "on"))
{
_elm_access_say(E_("State: On"));
}
else
_elm_access_say(E_("State: On"));
}
_elm_access_say(E_("State: On"));
}
else
{
elm_layout_signal_emit(obj, "elm,state,check,off", "elm");
if (_elm_config->access_mode != ELM_ACCESS_MODE_OFF)
{
if (!elm_layout_text_get(obj, "off"))
{
_elm_access_say(E_("State: Off"));
}
else
_elm_access_say(E_("State: Off"));
}
_elm_access_say(E_("State: Off"));
}
evas_object_smart_callback_call(obj, SIG_CHANGED, NULL);

View File

@ -110,8 +110,6 @@ _submenu_sizing_eval(Elm_Menu_Item *parent_it)
if (y_p + bh > py + ph)
y_p -= y_p + bh - (py + ph);
if (y_p < py)
y_p += y_p - y_p;
evas_object_move(parent_it->submenu.location, x_p, y_p);
evas_object_resize(parent_it->submenu.location, bw, h_p);
@ -149,10 +147,10 @@ _sizing_eval(Evas_Object *obj)
if (elm_widget_mirrored_get(obj)) x_p -= w_p;
if (x_p + bw > x2 + w2) x_p -= x_p + bw - (x2 + w2);
if (x_p < x2) x_p += x2 - x_p;
if (x_p < x2) x_p = x2;
if (y_p + h_p + bh > y2 + h2) y_p -= y_p + h_p + bh - (y2 + h2);
if (y_p < y2) y_p += y2 - y_p;
if (y_p < y2) y_p = y2;
evas_object_move(sd->location, x_p, y_p);
evas_object_resize(sd->location, bw, h_p);

View File

@ -833,16 +833,8 @@ _sizing_eval(Evas_Object *obj)
if (sd->shrink_mode == ELM_TOOLBAR_SHRINK_NONE)
{
if (sd->vertical)
{
minw = minw_bx + (w - vw);
minh = minh_bx + (h - vh);
}
else
{
minw = minw_bx + (w - vw);
minh = minh_bx + (h - vh);
}
minw = minw_bx + (w - vw);
minh = minh_bx + (h - vh);
}
else if (sd->shrink_mode == ELM_TOOLBAR_SHRINK_EXPAND)
{